You are here

public function TransitionTest::testGetters in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workflows/tests/src/Unit/TransitionTest.php \Drupal\Tests\workflows\Unit\TransitionTest::testGetters()
  2. 9 core/modules/workflows/tests/src/Unit/TransitionTest.php \Drupal\Tests\workflows\Unit\TransitionTest::testGetters()

@covers ::__construct @covers ::id @covers ::label

File

core/modules/workflows/tests/src/Unit/TransitionTest.php, line 22

Class

TransitionTest
@coversDefaultClass \Drupal\workflows\Transition

Namespace

Drupal\Tests\workflows\Unit

Code

public function testGetters() {
  $state = new Transition($this
    ->prophesize(WorkflowTypeInterface::class)
    ->reveal(), 'draft_published', 'Publish', [
    'draft',
  ], 'published');
  $this
    ->assertEquals('draft_published', $state
    ->id());
  $this
    ->assertEquals('Publish', $state
    ->label());
}