You are here

protected function LocationGoogleGeocoderTest::error in Location 6.3

Fire an error assertion.

Parameters

$message: The message to display along with the assertion.

$group: The type of assertion - examples are "Browser", "PHP".

$caller: The caller of the error.

Return value

FALSE.

Overrides LocationTestCase::error

File

tests/google_geocoder.test, line 34

Class

LocationGoogleGeocoderTest

Code

protected function error($message = '', $group = 'Other', array $caller = NULL) {
  if ($message == 'Undefined variable: location') {

    // change error (Notice) to debug message
    return $this
      ->assert('debug', $message, 'Debug', $caller);
  }
  if ($message == 'Undefined property: stdClass::$locations') {

    // change error (Notice) to debug message
    return $this
      ->assert('debug', $message, 'Debug', $caller);
  }
  return parent::error($message, $group, $caller);
}