function BlockLanguageCacheTest::setUp
Same name in other branches
- 8.9.x core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php \Drupal\Tests\block\Functional\BlockLanguageCacheTest::setUp()
- 10 core/modules/block/tests/src/Functional/BlockLanguageCacheTest.php \Drupal\Tests\block\Functional\BlockLanguageCacheTest::setUp()
- 11.x 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 37
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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.