function AliasManagerTest::setUpMockAliasPrefixList
Reinitializes the alias prefix list as a mock object.
4 calls to AliasManagerTest::setUpMockAliasPrefixList()
- AliasManagerTest::testGetAliasByPathCachedMissLanguage in core/
modules/ path_alias/ tests/ src/ Unit/ AliasManagerTest.php - Tests the getAliasByPath cache when a different language is requested.
- AliasManagerTest::testGetAliasByPathMatch in core/
modules/ path_alias/ tests/ src/ Unit/ AliasManagerTest.php - Tests the getAliasByPath method for a path that has a matching alias.
- AliasManagerTest::testGetAliasByPathNoMatch in core/
modules/ path_alias/ tests/ src/ Unit/ AliasManagerTest.php - Tests the getAliasByPath method for a path that has no matching alias.
- AliasManagerTest::testGetAliasByPathPrefixList in core/
modules/ path_alias/ tests/ src/ Unit/ AliasManagerTest.php - Tests the getAliasByPath method for a path that is not in the prefix list.
File
-
core/
modules/ path_alias/ tests/ src/ Unit/ AliasManagerTest.php, line 92
Class
Namespace
Drupal\Tests\path_alias\UnitCode
protected function setUpMockAliasPrefixList() : void {
$this->aliasPrefixList = $this->createMock(AliasPrefixListInterface::class);
$reflection = new \ReflectionProperty($this->aliasManager, 'pathPrefixes');
$reflection->setValue($this->aliasManager, $this->aliasPrefixList);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.