| 7 path.test | protected UrlAlterFunctionalTest::assertUrlInboundAlter($original, $final) |
| 8 path.test | protected UrlAlterFunctionalTest::assertUrlInboundAlter($original, $final) |
Assert that a inbound path is altered to an expected value.
Parameters
$original: A string with the aliased or un-normal path that is run through drupal_get_normal_path().
$final: A string with the expected result after url().
Return value
TRUE if $original was correctly altered to $final, FALSE otherwise.
File
- modules/
simpletest/ tests/ path.test, line 240 - Tests for path.inc.
Code
protected function assertUrlInboundAlter($original, $final) {
// Test inbound altering.
$result = drupal_get_normal_path($original);
$this->assertIdentical($result, $final, t('Altered inbound URL %original, expected %final, and got %result.', array('%original' => $original, '%final' => $final, '%result' => $result)));
}
Login or register to post comments