1 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 backdrop_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

core/modules/simpletest/tests/path.test, line 213
Tests for path.inc.

Class

UrlAlterFunctionalTest
Tests hook_url_alter functions.

Code

protected function assertUrlInboundAlter($original, $final) {
  // Test inbound altering.
  $result = backdrop_get_normal_path($original);
  $this->assertIdentical($result, $final, format_string('Altered inbound URL %original, expected %final, and got %result.', array('%original' => $original, '%final' => $final, '%result' => $result)));
}