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