You are here

public function WorkflowTest::testGetLabel in State Machine 8

@covers ::getLabel

File

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

Class

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

Namespace

Drupal\Tests\state_machine\Unit\Plugin\Workflow

Code

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