public function InstallerLanguageTest::testInstallerTranslationCache in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php \Drupal\KernelTests\Core\Installer\InstallerLanguageTest::testInstallerTranslationCache()
- 10 core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php \Drupal\KernelTests\Core\Installer\InstallerLanguageTest::testInstallerTranslationCache()
Tests profile info caching in non-English languages.
File
- core/
tests/ Drupal/ KernelTests/ Core/ Installer/ InstallerLanguageTest.php, line 45
Class
- InstallerLanguageTest
- Tests for installer language support.
Namespace
Drupal\KernelTests\Core\InstallerCode
public function testInstallerTranslationCache() {
require_once 'core/includes/install.inc';
// Prime the drupal_get_filename() static cache with the location of the
// testing profile as it is not the currently active profile and we don't
// yet have any cached way to retrieve its location.
// @todo Remove as part of https://www.drupal.org/node/2186491
drupal_get_filename('profile', 'testing', 'core/profiles/testing/testing.info.yml');
$info_en = install_profile_info('testing', 'en');
$info_nl = install_profile_info('testing', 'nl');
$this
->assertNotContains('locale', $info_en['install'], 'Locale is not set when installing in English.');
$this
->assertContains('locale', $info_nl['install'], 'Locale is set when installing in Dutch.');
}