function UrlAlterFunctionalTest::assertUrlOutboundAlter
Same name in this branch
- 10 core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php \Drupal\Tests\path_alias\Functional\UrlAlterFunctionalTest::assertUrlOutboundAlter()
Same name in other branches
- 7.x modules/simpletest/tests/path.test \UrlAlterFunctionalTest::assertUrlOutboundAlter()
- 9 core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php \Drupal\Tests\path_alias\Functional\UrlAlterFunctionalTest::assertUrlOutboundAlter()
- 8.9.x core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php \Drupal\Tests\path_alias\Functional\UrlAlterFunctionalTest::assertUrlOutboundAlter()
- 11.x core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php \Drupal\Tests\path_alias\Functional\UrlAlterFunctionalTest::assertUrlOutboundAlter()
- 11.x core/modules/forum/tests/src/Functional/UrlAlterFunctionalTest.php \Drupal\Tests\forum\Functional\UrlAlterFunctionalTest::assertUrlOutboundAlter()
Assert that an outbound path is altered to an expected value.
@internal
Parameters
string $original: A string with the original path that is run through generateFrommPath().
string $final: A string with the expected result after generateFrommPath().
1 call to UrlAlterFunctionalTest::assertUrlOutboundAlter()
- UrlAlterFunctionalTest::testUrlAlter in core/
modules/ forum/ tests/ src/ Functional/ UrlAlterFunctionalTest.php - Tests that URL altering works and that it occurs in the correct order.
File
-
core/
modules/ forum/ tests/ src/ Functional/ UrlAlterFunctionalTest.php, line 65
Class
- UrlAlterFunctionalTest
- Tests altering the inbound path and the outbound path.
Namespace
Drupal\Tests\forum\FunctionalCode
protected function assertUrlOutboundAlter(string $original, string $final) : void {
// Test outbound altering.
$result = $this->container
->get('path_processor_manager')
->processOutbound($original);
$this->assertSame($final, $result, "Altered outbound URL {$original}, expected {$final}, and got {$result}.");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.