You are here

public function LanguageNeutralAliasesStorageTest::testAliasExists in Language neutral aliases 8

Test that aliasExists() ignore non-language neutral aliases.

File

tests/src/Kernel/LanguageNeutralAliasesStorageTest.php, line 228

Class

LanguageNeutralAliasesStorageTest
Test language neutral aliases.

Namespace

Drupal\Tests\language_neutral_aliases\Kernel

Code

public function testAliasExists() {
  $storage = $this->container
    ->get('path.alias_storage');
  $this
    ->assertFalse($storage
    ->aliasExists('/path/first', LanguageInterface::LANGCODE_NOT_SPECIFIED));
  $this
    ->assertFalse($storage
    ->aliasExists('/path/first', 'de'));
  $this
    ->assertTrue($storage
    ->aliasExists('/path/third', LanguageInterface::LANGCODE_NOT_SPECIFIED));
  $this
    ->assertTrue($storage
    ->aliasExists('/path/third', 'de'));
}