protected function PathLanguageUiTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/path/tests/src/Functional/PathLanguageUiTest.php \Drupal\Tests\path\Functional\PathLanguageUiTest::setUp()
Overrides PathTestBase::setUp
File
- core/
modules/ path/ tests/ src/ Functional/ PathLanguageUiTest.php, line 26
Class
- PathLanguageUiTest
- Confirm that the Path module user interface works with languages.
Namespace
Drupal\Tests\path\FunctionalCode
protected function setUp() {
parent::setUp();
// Create and log in user.
$web_user = $this
->drupalCreateUser([
'edit any page content',
'create page content',
'administer url aliases',
'create url aliases',
'administer languages',
'access administration pages',
]);
$this
->drupalLogin($web_user);
// Enable French language.
$edit = [];
$edit['predefined_langcode'] = 'fr';
$this
->drupalPostForm('admin/config/regional/language/add', $edit, t('Add language'));
// Enable URL language detection and selection.
$edit = [
'language_interface[enabled][language-url]' => 1,
];
$this
->drupalPostForm('admin/config/regional/language/detection', $edit, t('Save settings'));
}