public function PathLanguageUiTest::testNonDefaultUrl in Drupal 9
Same name and namespace in other branches
- 8 core/modules/path/tests/src/Functional/PathLanguageUiTest.php \Drupal\Tests\path\Functional\PathLanguageUiTest::testNonDefaultUrl()
Tests that a non-default language URL alias works.
File
- core/
modules/ path/ tests/ src/ Functional/ PathLanguageUiTest.php, line 87
Class
- PathLanguageUiTest
- Confirm that the Path module user interface works with languages.
Namespace
Drupal\Tests\path\FunctionalCode
public function testNonDefaultUrl() {
$name = $this
->randomMachineName(8);
$edit = [];
$edit['path[0][value]'] = '/admin/config/search/path';
$edit['alias[0][value]'] = '/' . $name;
$edit['langcode[0][value]'] = 'fr';
$this
->drupalGet('admin/config/search/path/add');
$this
->submitForm($edit, 'Save');
$this
->drupalGet('fr/' . $name);
$this
->assertSession()
->pageTextContains('Filter aliases');
}