You are here

public function LanguageNeutralAliasesTest::testPathHasMatchingAlias in Language neutral aliases 8.2

Same name and namespace in other branches
  1. 3.x tests/src/Kernel/LanguageNeutralAliasesTest.php \Drupal\Tests\language_neutral_aliases\Kernel\LanguageNeutralAliasesTest::testPathHasMatchingAlias()

Test that pathHasMatchingAlias only checks language neutral aliases.

File

tests/src/Kernel/LanguageNeutralAliasesTest.php, line 215

Class

LanguageNeutralAliasesTest
Test language neutral aliases.

Namespace

Drupal\Tests\language_neutral_aliases\Kernel

Code

public function testPathHasMatchingAlias() {
  $repository = $this->container
    ->get('path_alias.repository');
  $this
    ->assertFalse($repository
    ->pathHasMatchingAlias('/node/1'));
  $this
    ->assertTrue($repository
    ->pathHasMatchingAlias('/node/3'));
}