You are here

function PathLanguageUiTest::testNonDefaultUrl in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/path/src/Tests/PathLanguageUiTest.php \Drupal\path\Tests\PathLanguageUiTest::testNonDefaultUrl()

Tests that a non-default language URL alias works.

File

core/modules/path/src/Tests/PathLanguageUiTest.php, line 74
Contains \Drupal\path\Tests\PathLanguageUiTest.

Class

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

Namespace

Drupal\path\Tests

Code

function testNonDefaultUrl() {
  $name = $this
    ->randomMachineName(8);
  $edit = array();
  $edit['source'] = '/admin/config/search/path';
  $edit['alias'] = '/' . $name;
  $edit['langcode'] = 'fr';
  $this
    ->drupalPostForm('admin/config/search/path/add', $edit, t('Save'));
  $this
    ->drupalGet('fr/' . $name);
  $this
    ->assertText(t('Filter aliases'), 'Foreign URL alias works');
}