You are here

protected function AgreementTestCase::assertUrl in Agreement 6.2

Pass if the internal browser's URL matches the given path.

Parameters

$path: The expected system path.

$options: (optional) Any additional options to pass for $path to url().

$message: Message to display.

$group: The group this message belongs to, defaults to 'Other'.

Return value

TRUE on pass, FALSE on fail.

Overrides DrupalWebTestCase::assertUrl

6 calls to AgreementTestCase::assertUrl()
AgreementCustomUnprivilegedUserTestCase::testAgreementDestination in ./agreement.test
AgreementDefaultsPrivilegedUserTestCase::testAgreement in ./agreement.test
AgreementTestCase::isAgreementPage in ./agreement.test
AgreementTestCase::isFrontPage in ./agreement.test
AgreementTestCase::isUserProfileEditPage in ./agreement.test

... See full list

File

./agreement.test, line 35
Tests for Agreement module.

Class

AgreementTestCase
@file Tests for Agreement module.

Code

protected function assertUrl($path, array $options = array(), $message = '', $group = 'Other') {
  if (!$message) {
    $message = t('Current URL is @url.', array(
      '@url' => var_export(url($path, $options), TRUE),
    ));
  }
  $options['absolute'] = TRUE;
  return $this
    ->assertEqual($this
    ->getUrl(), url($path, $options), $message, $group);
}