You are here

public function WorkflowsFieldTest::testWorkflowType in Workflows Field 2.x

Same name and namespace in other branches
  1. 8 tests/src/Kernel/WorkflowsFieldTest.php \Drupal\Tests\workflows_field\Kernel\WorkflowsFieldTest::testWorkflowType()

@covers \Drupal\workflows_field\Plugin\WorkflowType\WorkflowsField

File

tests/src/Kernel/WorkflowsFieldTest.php, line 104

Class

WorkflowsFieldTest
Test the workflows field.

Namespace

Drupal\Tests\workflows_field\Kernel

Code

public function testWorkflowType() {

  // Test the initial state based on the config, despite the state weights.
  $type = Workflow::load('bureaucracy_workflow')
    ->getTypePlugin();
  $this
    ->assertEquals('in_discussion', $type
    ->getInitialState()
    ->id());
}