You are here

public function LingotekConfigOverridesTest::testDefaultWorkflowOverride in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  2. 4.0.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  3. 3.0.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  4. 3.1.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  5. 3.2.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  6. 3.3.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  7. 3.4.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  8. 3.5.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  9. 3.7.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()
  10. 3.8.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultWorkflowOverride()

File

tests/src/Functional/LingotekConfigOverridesTest.php, line 42

Class

LingotekConfigOverridesTest
Tests config overrides in settings.php are possible .

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testDefaultWorkflowOverride() {
  $GLOBALS['config']['lingotek.settings']['default']['workflow'] = 'abc';

  // Container was not rebuilt yet.
  $defaults = \Drupal::service('lingotek')
    ->getDefaults();
  $this
    ->assertIdentical('test_workflow', $defaults['workflow'], 'Default workflow could be overridden by settings.php');

  // Editing settings.php forces us to rebuild the container.
  $GLOBALS['config']['lingotek.settings']['default']['workflow'] = 'def';
  $this
    ->rebuildContainer();
  $defaults = \Drupal::service('lingotek')
    ->getDefaults();
  $this
    ->assertIdentical('def', $defaults['workflow'], 'Default workflow could be overridden by settings.php');
}