function AliasTest::testLookupBySystemPath

Same name in other branches
  1. 9 core/modules/path_alias/tests/src/Kernel/AliasTest.php \Drupal\Tests\path_alias\Kernel\AliasTest::testLookupBySystemPath()
  2. 8.9.x core/modules/path_alias/tests/src/Kernel/AliasTest.php \Drupal\Tests\path_alias\Kernel\AliasTest::testLookupBySystemPath()
  3. 10 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 291

Class

AliasTest
Tests path alias CRUD and lookup functionality.

Namespace

Drupal\Tests\path_alias\Kernel

Code

public function testLookupBySystemPath() : void {
    $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']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.