You are here

public function WorkflowTest::testGetId in State Machine 8

@covers ::getId

File

tests/src/Unit/Plugin/Workflow/WorkflowTest.php, line 21

Class

WorkflowTest
@coversDefaultClass \Drupal\state_machine\Plugin\Workflow\Workflow @group state_machine

Namespace

Drupal\Tests\state_machine\Unit\Plugin\Workflow

Code

public function testGetId() {
  $guard_factory = $this
    ->prophesize(GuardFactoryInterface::class);
  $plugin_definition = [
    'id' => 'test id',
    'label' => 'test label',
    'states' => [],
    'transitions' => [],
  ];
  $workflow = new Workflow([], 'test', $plugin_definition, $guard_factory
    ->reveal());
  $this
    ->assertEquals('test id', $workflow
    ->getId());
}