You are here

protected function UrlAlterFunctionalTest::assertUrlInboundAlter in SimpleTest 7

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.

1 call to UrlAlterFunctionalTest::assertUrlInboundAlter()
UrlAlterFunctionalTest::testUrlAlter in tests/path.test
Test that URL altering works and that it occurs in the correct order.

File

tests/path.test, line 231
Tests for path.inc.

Class

UrlAlterFunctionalTest
Tests hook_url_alter functions.

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,
  )));
}