public function LanguageNeutralAliasesTest::testPreloadPathAlias in Language neutral aliases 8.2
Same name and namespace in other branches
- 3.x tests/src/Kernel/LanguageNeutralAliasesTest.php \Drupal\Tests\language_neutral_aliases\Kernel\LanguageNeutralAliasesTest::testPreloadPathAlias()
Test that preloadPathAlias() only returns language neutral aliases.
File
- tests/
src/ Kernel/ LanguageNeutralAliasesTest.php, line 135
Class
- LanguageNeutralAliasesTest
- Test language neutral aliases.
Namespace
Drupal\Tests\language_neutral_aliases\KernelCode
public function testPreloadPathAlias() {
$repository = $this->container
->get('path_alias.repository');
$this
->assertEqual([
'/node/3' => '/path/third',
], $repository
->preloadPathAlias([
'/node/1',
'/node/3',
], LanguageInterface::LANGCODE_NOT_SPECIFIED));
$this
->assertEqual([
'/node/3' => '/path/third',
], $repository
->preloadPathAlias([
'/node/1',
'/node/3',
], 'de'));
}