function StateTest::testGetters
Tests getters.
@legacy-covers ::__construct @legacy-covers ::id @legacy-covers ::label @legacy-covers ::weight
File
-
core/
modules/ workflows/ tests/ src/ Unit/ StateTest.php, line 29
Class
- StateTest
- Tests Drupal\workflows\State.
Namespace
Drupal\Tests\workflows\UnitCode
public function testGetters() : void {
$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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.