You are here

public function AliasTest::testLookupBySystemPath in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/path_alias/tests/src/Kernel/AliasTest.php \Drupal\Tests\path_alias\Kernel\AliasTest::testLookupBySystemPath()
  2. 9 core/modules/path_alias/tests/src/Kernel/AliasTest.php \Drupal\Tests\path_alias\Kernel\AliasTest::testLookupBySystemPath()

@covers ::lookupBySystemPath

File

core/modules/path_alias/tests/src/Kernel/AliasTest.php, line 44

Class

AliasTest
Tests path alias CRUD and lookup functionality.

Namespace

Drupal\Tests\path_alias\Kernel

Code

public function testLookupBySystemPath() {
  $this
    ->createPathAlias('/test-source-Case', '/test-alias');
  $path_alias_repository = $this->container
    ->get('path_alias.repository');
  $this
    ->assertEquals('/test-alias', $path_alias_repository
    ->lookupBySystemPath('/test-source-Case', LanguageInterface::LANGCODE_NOT_SPECIFIED)['alias']);
  $this
    ->assertEquals('/test-alias', $path_alias_repository
    ->lookupBySystemPath('/test-source-case', LanguageInterface::LANGCODE_NOT_SPECIFIED)['alias']);
}