You are here

protected function WorkflowCollectorTest::assertNoState in Workbench Moderation to Content Moderation 8.2

Asserts that a workflow type plugin does not have a specific state.

Parameters

\Drupal\workflows\WorkflowTypeInterface $plugin: The workflow type plugin.

string $state_id: The state ID.

1 call to WorkflowCollectorTest::assertNoState()
WorkflowCollectorTest::assertWorkflow in tests/src/Kernel/WorkflowCollectorTest.php
Asserts various aspects of a workflow.

File

tests/src/Kernel/WorkflowCollectorTest.php, line 220

Class

WorkflowCollectorTest
@covers \Drupal\wbm2cm\WorkflowCollector @group wbm2cm

Namespace

Drupal\Tests\wbm2cm\Kernel

Code

protected function assertNoState(WorkflowTypeInterface $plugin, $state_id) {
  try {
    $plugin
      ->getState($state_id);
    $this
      ->fail();
  } catch (\InvalidArgumentException $e) {
    $this
      ->assertTrue(TRUE);
  }
}