public function LingotekConfigOverridesTest::testDefaultCommunityOverride in Lingotek Translation 3.1.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 4.0.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 3.0.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 3.2.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 3.3.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 3.4.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 3.5.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 3.6.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 3.7.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
- 3.8.x tests/src/Functional/LingotekConfigOverridesTest.php \Drupal\Tests\lingotek\Functional\LingotekConfigOverridesTest::testDefaultCommunityOverride()
File
- tests/
src/ Functional/ LingotekConfigOverridesTest.php, line 12
Class
- LingotekConfigOverridesTest
- Tests config overrides in settings.php are possible .
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testDefaultCommunityOverride() {
$GLOBALS['config']['lingotek.settings']['default']['community'] = 'abc';
// Container was not rebuilt yet.
$community = \Drupal::service('lingotek')
->get('default.community');
$this
->assertIdentical('test_community', $community, 'Default community could be overridden by settings.php');
// Editing settings.php forces us to rebuild the container.
$GLOBALS['config']['lingotek.settings']['default']['community'] = 'def';
$this
->rebuildContainer();
$community = \Drupal::service('lingotek')
->get('default.community');
$this
->assertIdentical('def', $community, 'Default community could be overridden by settings.php');
}