public function PathProcessorAliasTest::testProcessInbound in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/PathProcessor/PathProcessorAliasTest.php \Drupal\Tests\Core\PathProcessor\PathProcessorAliasTest::testProcessInbound()
Tests the processInbound method.
See also
\Drupal\Core\PathProcessor\PathProcessorAlias::processInbound
File
- core/
tests/ Drupal/ Tests/ Core/ PathProcessor/ PathProcessorAliasTest.php, line 46 - Contains \Drupal\Tests\Core\PathProcessor\PathProcessorAliasTest.
Class
- PathProcessorAliasTest
- @coversDefaultClass \Drupal\Core\PathProcessor\PathProcessorAlias @group PathProcessor
Namespace
Drupal\Tests\Core\PathProcessorCode
public function testProcessInbound() {
$this->aliasManager
->expects($this
->exactly(2))
->method('getPathByAlias')
->will($this
->returnValueMap(array(
array(
'urlalias',
NULL,
'internal-url',
),
array(
'url',
NULL,
'url',
),
)));
$request = Request::create('/urlalias');
$this
->assertEquals('internal-url', $this->pathProcessor
->processInbound('urlalias', $request));
$request = Request::create('/url');
$this
->assertEquals('url', $this->pathProcessor
->processInbound('url', $request));
}