public function StateTest::testGetters in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workflows/tests/src/Unit/StateTest.php \Drupal\Tests\workflows\Unit\StateTest::testGetters()
- 10 core/modules/workflows/tests/src/Unit/StateTest.php \Drupal\Tests\workflows\Unit\StateTest::testGetters()
@covers ::__construct @covers ::id @covers ::label @covers ::weight
File
- core/
modules/ workflows/ tests/ src/ Unit/ StateTest.php, line 23
Class
- StateTest
- @coversDefaultClass \Drupal\workflows\State
Namespace
Drupal\Tests\workflows\UnitCode
public function testGetters() {
$state = new State($this
->prophesize(WorkflowTypeInterface::class)
->reveal(), 'draft', 'Draft', 3);
$this
->assertEquals('draft', $state
->id());
$this
->assertEquals('Draft', $state
->label());
$this
->assertEquals(3, $state
->weight());
}