public function LanguageNeutralAliasesStorageTest::testLookupPathAlias in Language neutral aliases 8
Test that lookupPathAlias() only returns language neutral aliases.
File
- tests/
src/ Kernel/ LanguageNeutralAliasesStorageTest.php, line 186
Class
- LanguageNeutralAliasesStorageTest
- Test language neutral aliases.
Namespace
Drupal\Tests\language_neutral_aliases\KernelCode
public function testLookupPathAlias() {
$storage = $this->container
->get('path.alias_storage');
$this
->assertEqual('/path/third', $storage
->lookupPathAlias('/node/3', LanguageInterface::LANGCODE_NOT_SPECIFIED));
$this
->assertEqual('/path/third', $storage
->lookupPathAlias('/node/3', 'de'));
$this
->assertFalse($storage
->lookupPathAlias('/node/1', LanguageInterface::LANGCODE_NOT_SPECIFIED));
$this
->assertFalse($storage
->lookupPathAlias('/node/1', 'de'));
}