public function AliasTest::testLookupByAlias in Drupal 8
Same name and namespace in other branches
- 9 core/modules/path_alias/tests/src/Kernel/AliasTest.php \Drupal\Tests\path_alias\Kernel\AliasTest::testLookupByAlias()
@covers ::lookupByAlias
File
- core/
modules/ path_alias/ tests/ src/ Kernel/ AliasTest.php, line 55
Class
- AliasTest
- Tests path alias CRUD and lookup functionality.
Namespace
Drupal\Tests\path_alias\KernelCode
public function testLookupByAlias() {
$this
->createPathAlias('/test-source', '/test-alias-Case');
$path_alias_repository = $this->container
->get('path_alias.repository');
$this
->assertEquals('/test-source', $path_alias_repository
->lookupByAlias('/test-alias-Case', LanguageInterface::LANGCODE_NOT_SPECIFIED)['path']);
$this
->assertEquals('/test-source', $path_alias_repository
->lookupByAlias('/test-alias-case', LanguageInterface::LANGCODE_NOT_SPECIFIED)['path']);
}