diff --git a/core/modules/path/src/Tests/PathAdminTest.php b/core/modules/path/src/Tests/PathAdminTest.php index 610b909..1c85415 100644 --- a/core/modules/path/src/Tests/PathAdminTest.php +++ b/core/modules/path/src/Tests/PathAdminTest.php @@ -7,6 +7,8 @@ namespace Drupal\path\Tests; +use Drupal\Component\Utility\Unicode; + /** * Tests the Path admin UI. * @@ -39,21 +41,21 @@ public function testPathFiltering() { $node3 = $this->drupalCreateNode(); // Create aliases. - $alias1 = '/' . $this->randomMachineName(8); + $alias1 = '/' . Unicode::strtolower($this->randomMachineName(8)); $edit = array( 'source' => '/node/' . $node1->id(), 'alias' => $alias1, ); $this->drupalPostForm('admin/config/search/path/add', $edit, t('Save')); - $alias2 = '/' . $this->randomMachineName(8); + $alias2 = '/' . Unicode::strtolower($this->randomMachineName(8)); $edit = array( 'source' => '/node/' . $node2->id(), 'alias' => $alias2, ); $this->drupalPostForm('admin/config/search/path/add', $edit, t('Save')); - $alias3 = '/' . $this->randomMachineName(4) . '/' . $this->randomMachineName(4); + $alias3 = '/' . Unicode::strtolower($this->randomMachineName(4)) . '/' . Unicode::strtolower($this->randomMachineName(4)); $edit = array( 'source' => '/node/' . $node3->id(), 'alias' => $alias3, diff --git a/core/modules/system/src/Tests/Path/AliasTest.php b/core/modules/system/src/Tests/Path/AliasTest.php index 76cd859..b156921 100644 --- a/core/modules/system/src/Tests/Path/AliasTest.php +++ b/core/modules/system/src/Tests/Path/AliasTest.php @@ -109,7 +109,7 @@ function testLookupPath() { // Hook that clears cache is not executed with unit tests. \Drupal::service('path.alias_manager')->cacheClear(); - $this->assertEqual($aliasManager->getAliasByPath($path['source']), Unicode::strtolower($path['alias']), 'English alias overrides language-neutral alias.'); + $this->assertEqual($aliasManager->getAliasByPath($path['source']), $path['alias'], 'English alias overrides language-neutral alias.'); $this->assertEqual($aliasManager->getPathByAlias($path['alias']), $path['source'], 'English source overrides language-neutral source.'); // Create a language-neutral alias for the same path, again. @@ -129,7 +129,7 @@ function testLookupPath() { $aliasStorage->save($path['source'], $path['alias'], $path['langcode']); $this->assertEqual($aliasManager->getAliasByPath($path['source']), "/users/Dries", 'English alias still returned after entering a LOLspeak alias.'); // The LOLspeak alias should be returned if we really want LOLspeak. - $this->assertEqual($aliasManager->getAliasByPath($path['source'], 'xx-lolspeak'), '/lol', 'LOLspeak alias returned if we specify xx-lolspeak to the alias manager.'); + $this->assertEqual($aliasManager->getAliasByPath($path['source'], 'xx-lolspeak'), '/LOL', 'LOLspeak alias returned if we specify xx-lolspeak to the alias manager.'); // Create a new alias for this path in English, which should override the // previous alias for "user/1".