You are here

public function InstallTest::testWorkflowNotExists in Lightning Workflow 8.3

Tests that the editorial workflow is installed if it doesn't already exist.

File

tests/src/Functional/InstallTest.php, line 28

Class

InstallTest
Tests that our configuration is correctly installed in various contexts.

Namespace

Drupal\Tests\lightning_workflow\Functional

Code

public function testWorkflowNotExists() {
  $this
    ->assertEmpty(Workflow::load('editorial'));
  $this->container
    ->get('module_installer')
    ->install([
    'lightning_workflow',
  ]);
  $this
    ->assertInstanceOf(Workflow::class, Workflow::load('editorial'));
}