You are here

public function ModerationStateEntityTest::moderationStateProvider in Workbench Moderation 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/ModerationStateEntityTest.php \Drupal\Tests\workbench_moderation\Kernel\ModerationStateEntityTest::moderationStateProvider()

Data provider for ::testModerationStateProperties.

File

tests/src/Kernel/ModerationStateEntityTest.php, line 57

Class

ModerationStateEntityTest
Class ModerationStateEntityTest

Namespace

Drupal\Tests\workbench_moderation\Kernel

Code

public function moderationStateProvider() {
  return [
    // Draft, Needs review; should not touch the default revision.
    [
      FALSE,
      FALSE,
      FALSE,
      FALSE,
    ],
    // Published; this state should update and publish the default revision.
    [
      TRUE,
      TRUE,
      TRUE,
      TRUE,
    ],
    // Archive; this state should update but not publish the default revision.
    [
      FALSE,
      TRUE,
      FALSE,
      TRUE,
    ],
    // We try to prevent creating this state via the UI, but when a moderation
    // state is a published state, it should also become the default revision.
    [
      TRUE,
      FALSE,
      TRUE,
      TRUE,
    ],
  ];
}