You are here

protected function UcAddressesTestCase::assertAddressLabel in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 tests/UcAddressesTestCase.test \UcAddressesTestCase::assertAddressLabel()

Pass if an address label is found on the page.

Parameters

UcAddressesAddress $address: The address to find on the page.

string $message: Message to display.

Return value

TRUE if the assertion succeeded, FALSE otherwise.

2 calls to UcAddressesTestCase::assertAddressLabel()
UcAddressesViewsTestCase::testAddressRowStyle in tests/uc_addresses.views.test
Tests if the row plugin works as expected.
UcAddressesViewsTestCase::testDefaultView in tests/uc_addresses.views.test
Tests if the default view works as expected.

File

tests/UcAddressesTestCase.test, line 570
Contains base class for Ubercart Addresses tests.

Class

UcAddressesTestCase
Base class for Ubercart Addresses tests.

Code

protected function assertAddressLabel(UcAddressesAddress $address, $message = '') {
  $message = $message ? $message : t('Address %id found.', array(
    '%id' => $address
      ->getId(),
  ));
  $this
    ->assertRaw(uc_addresses_format_address($address), $message, 'uc_addresses');
}