You are here

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

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

Parameters

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

string $transition_id: The transition ID.

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

File

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

Class

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

Namespace

Drupal\Tests\wbm2cm\Kernel

Code

protected function assertNoTransition(WorkflowTypeInterface $plugin, $transition_id) {
  try {
    $plugin
      ->getTransition($transition_id);
    $this
      ->fail();
  } catch (\InvalidArgumentException $e) {
    $this
      ->assertTrue(TRUE);
  }
}