protected function UcAddressesTestCase::viewAddressBook in Ubercart Addresses 7
Same name and namespace in other branches
- 6.2 tests/UcAddressesTestCase.test \UcAddressesTestCase::viewAddressBook()
View the address book of an user.
Parameters
object $account: The user to view the address book for.
boolean $may_view: (optional) If expected if the user may view the address.
Return value
void
5 calls to UcAddressesTestCase::viewAddressBook()
- UcAddressesAddressBookTestCase::doOtherUsersAddressTests in tests/
uc_addresses.addressbook.test - Does basic tests for viewing, editing and deleting other ones addresses.
- UcAddressesAddressBookTestCase::doOwnAddressTests in tests/
uc_addresses.addressbook.test - Does basic tests for viewing, editing and deleting own addresses.
- UcAddressesFeedsTest::test in tests/
uc_addresses.feeds.test - Test address creation.
- UcAddressesUserRegistrationTestCase::testRegistration in tests/
uc_addresses.register.test - Register the user and assign privileges of the customerDelete account.
- UcAddressesViewsTestCase::testDefaultView in tests/
uc_addresses.views.test - Tests if the default view works as expected.
File
- tests/
UcAddressesTestCase.test, line 79 - Contains base class for Ubercart Addresses tests.
Class
- UcAddressesTestCase
- Base class for Ubercart Addresses tests.
Code
protected function viewAddressBook($account, $may_view = NULL) {
// Go to the address book
$this
->drupalGet($this
->constructAddressUrl($account));
// Test response code
if (!is_null($may_view)) {
$this
->assertResponse($may_view ? 200 : 403);
}
}