trait NodeRevisionDeleteTestTrait in Node Revision Delete 8
Trait for common test functions.
Hierarchy
- trait \Drupal\Tests\node_revision_delete\Traits\NodeRevisionDeleteTestTrait
2 files declare their use of NodeRevisionDeleteTestTrait
- NodeRevisionDeleteConfigTest.php in tests/
src/ Kernel/ NodeRevisionDeleteConfigTest.php - NodeRevisionDeleteTest.php in tests/
src/ Unit/ NodeRevisionDeleteTest.php
File
- tests/
src/ Traits/ NodeRevisionDeleteTestTrait.php, line 8
Namespace
Drupal\Tests\node_revision_delete\TraitsView source
trait NodeRevisionDeleteTestTrait {
/**
* Returns an array of content types to track.
*
* Each index determine a set of content types.
*
* @return array
* An array of content types to track keyed by content type machine name.
*/
public function getNodeRevisionDeleteTrackArray() {
$values = [
'article' => [
'node_revision_delete' => [
'minimum_revisions_to_keep' => 20,
'minimum_age_to_delete' => 8,
'when_to_delete' => 12,
],
],
'blog' => [
'node_revision_delete' => [
'minimum_revisions_to_keep' => 5,
'minimum_age_to_delete' => 3,
'when_to_delete' => 10,
],
],
'page' => [
'node_revision_delete' => [
'minimum_revisions_to_keep' => 4,
'minimum_age_to_delete' => 6,
'when_to_delete' => 8,
],
],
];
return $values;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NodeRevisionDeleteTestTrait:: |
public | function | Returns an array of content types to track. |