You are here

public function QueryParametersToURLTestCase::assertStatusAndPath in Query Parameters To URL 7

Asserts that the status code and paths are equivalent.

4 calls to QueryParametersToURLTestCase::assertStatusAndPath()
QueryParametersToURLGlobalRedirectTestCase::testRedirectWithQueryParameters in ./query_parameters_to_url.test
Tests if a path with query parameters gets redirected to the clean path.
QueryParametersToURLGlobalRedirectTestCase::testURLRewriting in ./query_parameters_to_url.test
Tests if inbound/outbound hooks do their job.
QueryParametersToURLTestCase::testRedirectWithQueryParameters in ./query_parameters_to_url.test
Tests if a path with query parameters gets redirected to the clean path.
QueryParametersToURLTestCase::testURLRewriting in ./query_parameters_to_url.test
Tests if inbound/outbound hooks do their job.

File

./query_parameters_to_url.test, line 285
Query Arguments To URL tests.

Class

QueryParametersToURLTestCase
General test cases.

Code

public function assertStatusAndPath($result) {

  // Make sure status and paths actually match.
  if ($this
    ->expectedStatus($result['!actual_status'], $result['!expected_status']) && $result['!actual_path'] == $result['!expected_path']) {
    return $this
      ->pass(format_string($this
      ->getSuccessMessage(), $result));
  }
  else {
    return $this
      ->fail(format_string($this
      ->getErrorMessage(), $result));
  }
}