protected function UcAddressesTestCase::viewAddress in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 tests/UcAddressesTestCase.test \UcAddressesTestCase::viewAddress()
View a single address of an user.
Parameters
object $account: The user to view an address for
int $aid: The ID of the address to view
boolean $may_view: (optional) If expected if the user may view the address.
Return value
void
4 calls to UcAddressesTestCase::viewAddress()
- UcAddressesApiTestCase::testAddressFormatWithoutDefaultCountry in tests/
uc_addresses.api.test - Tests if a proper address format is generated when there is no default country set.
- UcAddressesTestCase::createAddress in tests/
UcAddressesTestCase.test - Create a new address for an user.
- UcAddressesTestCase::doCrudTests in tests/
UcAddressesTestCase.test - Test if user can view, edit or delete the address.
- UcAddressesTestCase::editAddress in tests/
UcAddressesTestCase.test - Edit an address of an user.
File
- tests/
UcAddressesTestCase.test, line 100 - Contains base class for Ubercart Addresses tests.
Class
- UcAddressesTestCase
- Base class for Ubercart Addresses tests.
Code
protected function viewAddress($account, $aid, $may_view = NULL) {
// Go to the view address page
$this
->drupalGet($this
->constructAddressUrl($account, $aid));
// Test response code
if (!is_null($may_view)) {
$this
->assertResponse($may_view ? 200 : 403);
}
}