public function ModerationActionsTest::nodeStatusActionsTestCases in Drupal 9
Same name and namespace in other branches
- 8 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 107 
Class
- ModerationActionsTest
- Test the content moderation actions.
Namespace
Drupal\Tests\content_moderation\FunctionalCode
public 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,
    ],
  ];
}