public function StateTest::testLabelCallback in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workflows/tests/src/Unit/StateTest.php \Drupal\Tests\workflows\Unit\StateTest::testLabelCallback()
- 10 core/modules/workflows/tests/src/Unit/StateTest.php \Drupal\Tests\workflows\Unit\StateTest::testLabelCallback()
@covers ::labelCallback
File
- core/modules/ workflows/ tests/ src/ Unit/ StateTest.php, line 100 
Class
- StateTest
- @coversDefaultClass \Drupal\workflows\State
Namespace
Drupal\Tests\workflows\UnitCode
public function testLabelCallback() {
  $workflow_type = $this
    ->prophesize(WorkflowTypeInterface::class)
    ->reveal();
  $states = [
    new State($workflow_type, 'draft', 'Draft'),
    new State($workflow_type, 'published', 'Published'),
  ];
  $this
    ->assertEquals([
    'Draft',
    'Published',
  ], array_map([
    State::class,
    'labelCallback',
  ], $states));
}