protected function UrlAlterFunctionalTest::assertUrlInboundAlter in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Path/UrlAlterFunctionalTest.php \Drupal\system\Tests\Path\UrlAlterFunctionalTest::assertUrlInboundAlter()
Assert that a inbound path is altered to an expected value.
Parameters
$original: The original path before it has been altered by inbound URL processing.
$final: A string with the expected result.
Return value
TRUE if $original was correctly altered to $final, FALSE otherwise.
1 call to UrlAlterFunctionalTest::assertUrlInboundAlter()
- UrlAlterFunctionalTest::testUrlAlter in core/
modules/ system/ src/ Tests/ Path/ UrlAlterFunctionalTest.php - Test that URL altering works and that it occurs in the correct order.
File
- core/
modules/ system/ src/ Tests/ Path/ UrlAlterFunctionalTest.php, line 105 - Contains \Drupal\system\Tests\Path\UrlAlterFunctionalTest.
Class
- UrlAlterFunctionalTest
- Tests altering the inbound path and the outbound path.
Namespace
Drupal\system\Tests\PathCode
protected function assertUrlInboundAlter($original, $final) {
// Test inbound altering.
$result = $this->container
->get('path.alias_manager')
->getPathByAlias($original);
return $this
->assertIdentical($result, $final, format_string('Altered inbound URL %original, expected %final, and got %result.', array(
'%original' => $original,
'%final' => $final,
'%result' => $result,
)));
}