function ModerationActionsTest::nodeStatusActionsTestCases
Same name in other branches
- 9 core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php \Drupal\Tests\content_moderation\Functional\ModerationActionsTest::nodeStatusActionsTestCases()
- 8.9.x core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php \Drupal\Tests\content_moderation\Functional\ModerationActionsTest::nodeStatusActionsTestCases()
- 10 core/modules/content_moderation/tests/src/Functional/ModerationActionsTest.php \Drupal\Tests\content_moderation\Functional\ModerationActionsTest::nodeStatusActionsTestCases()
Test cases for ::testNodeStatusActions.
Return value
array An array of test cases.
File
-
core/
modules/ content_moderation/ tests/ src/ Functional/ ModerationActionsTest.php, line 105
Class
- ModerationActionsTest
- Test the content moderation actions.
Namespace
Drupal\Tests\content_moderation\FunctionalCode
public static function nodeStatusActionsTestCases() {
return [
'Moderated bundle shows warning (publish action)' => [
'node_publish_action',
'moderated_bundle',
TRUE,
// If the node starts out unpublished, the action should not work.
FALSE,
FALSE,
],
'Moderated bundle shows warning (unpublish action)' => [
'node_unpublish_action',
'moderated_bundle',
TRUE,
// If the node starts out published, the action should not work.
TRUE,
TRUE,
],
'Normal bundle works (publish action)' => [
'node_publish_action',
'standard_bundle',
FALSE,
// If the node starts out unpublished, the action should work.
FALSE,
TRUE,
],
'Normal bundle works (unpublish action)' => [
'node_unpublish_action',
'standard_bundle',
FALSE,
// If the node starts out published, the action should work.
TRUE,
FALSE,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.