protected function BlockLanguageTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/block/tests/src/Functional/BlockLanguageTest.php \Drupal\Tests\block\Functional\BlockLanguageTest::setUp()
Overrides BrowserTestBase::setUp
File
- core/
modules/ block/ tests/ src/ Functional/ BlockLanguageTest.php, line 33
Class
- BlockLanguageTest
- Tests if a block can be configured to be only visible on a particular language.
Namespace
Drupal\Tests\block\FunctionalCode
protected function setUp() {
parent::setUp();
$this->adminUser = $this
->drupalCreateUser([
'administer blocks',
'administer languages',
]);
$this
->drupalLogin($this->adminUser);
// Add predefined language.
$edit = [
'predefined_langcode' => 'fr',
];
$this
->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language'));
$this
->assertText('French', 'Language added successfully.');
}