You are here

protected function UcAddressesTestCase::doCrudTests in Ubercart Addresses 7

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

Test if user can view, edit or delete the address.

Parameters

object $account: The account to view the address for.

int $aid: The ID of the address to do crud tests for.

boolean $may_view: If the address may be viewed by the currently logged in user.

boolean $may_edit: If the address may be viewed by the currently logged in user.

boolean $may_delete: If the address may be viewed by the currently logged in user.

array $values: (optional) Values to fill in when editing the address.

Return value

void

3 calls to UcAddressesTestCase::doCrudTests()
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.
UcAddressesUserRegistrationTestCase::testRegistration in tests/uc_addresses.register.test
Register the user and assign privileges of the customerDelete account.

File

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

Class

UcAddressesTestCase
Base class for Ubercart Addresses tests.

Code

protected function doCrudTests($account, $aid, $may_view = TRUE, $may_edit = TRUE, $may_delete = TRUE, $values = array()) {

  // View this address
  $this
    ->viewAddress($account, $aid, $may_view);

  // Edit this address
  $this
    ->editAddress($account, $aid, $may_edit, $values);

  // Delete this address
  $this
    ->deleteAddress($account, $aid, $may_delete);
}