protected function BlockLanguageCacheTest::setUp in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php \Drupal\Tests\block\Functional\BlockLanguageCacheTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ block/ tests/ src/ Functional/ BlockLanguageCacheTest.php, line 34
Class
- BlockLanguageCacheTest
- Tests display of menu blocks with multiple languages.
Namespace
Drupal\Tests\block\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Create test languages.
$this->langcodes = [
ConfigurableLanguage::load('en'),
];
for ($i = 1; $i < 3; ++$i) {
$language = ConfigurableLanguage::create([
'id' => 'l' . $i,
'label' => $this
->randomString(),
]);
$language
->save();
$this->langcodes[$i] = $language;
}
}