You are here

public function PathLanguageUiTest::testLanguageNeutralUrl in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/path/tests/src/Functional/PathLanguageUiTest.php \Drupal\Tests\path\Functional\PathLanguageUiTest::testLanguageNeutralUrl()

Tests that a language-neutral URL alias works.

File

core/modules/path/tests/src/Functional/PathLanguageUiTest.php, line 54

Class

PathLanguageUiTest
Confirm that the Path module user interface works with languages.

Namespace

Drupal\Tests\path\Functional

Code

public function testLanguageNeutralUrl() {
  $name = $this
    ->randomMachineName(8);
  $edit = [];
  $edit['path[0][value]'] = '/admin/config/search/path';
  $edit['alias[0][value]'] = '/' . $name;
  $this
    ->drupalPostForm('admin/config/search/path/add', $edit, t('Save'));
  $this
    ->drupalGet($name);
  $this
    ->assertText(t('Filter aliases'), 'Language-neutral URL alias works');
}