function PathLanguageUiTest::testDefaultLanguageUrl

Tests that a default language URL alias works.

File

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

Class

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

Namespace

Drupal\Tests\path\Functional

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.