function DrupalFlushAllCachesInInstallerTest::testInstalled
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php \Drupal\FunctionalTests\Installer\DrupalFlushAllCachesInInstallerTest::testInstalled()
- 10 core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php \Drupal\FunctionalTests\Installer\DrupalFlushAllCachesInInstallerTest::testInstalled()
- 9 core/tests/Drupal/FunctionalTests/Installer/DrupalFlushAllCachesInInstallerTest.php \Drupal\FunctionalTests\Installer\DrupalFlushAllCachesInInstallerTest::testInstalled()
Confirms that the installation succeeded in the selected language.
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ DrupalFlushAllCachesInInstallerTest.php, line 112
Class
- DrupalFlushAllCachesInInstallerTest
- Tests drupal_flush_all_caches() and container rebuilds during an install.
Namespace
Drupal\FunctionalTests\InstallerCode
public function testInstalled() : void {
$this->assertTrue(\Drupal::state()->get('cache_flush_test'));
// Ensure the container rebuild in cache_flush_test_module_install()
// actually happened.
$this->assertTrue(\Drupal::moduleHandler()->moduleExists('dblog'));
// Configuration created by the profile's hook_install() is in the
// language the site was installed in.
$this->assertSame('de', DateFormat::load('cache_flush_test')->language()
->getId());
// The installed site's default language is the selected language.
$this->assertSame('de', $this->config('system.site')
->get('langcode'));
$this->assertSame('de', $this->config('system.site')
->get('default_langcode'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.