protected function CommerceBaseTestCase::generateAddressInformation in Commerce Core 7
Generate random valid information for Address information.
14 calls to CommerceBaseTestCase::generateAddressInformation()
- CommerceBaseTestCase::createDummyCustomerProfile in tests/
commerce_base.test - Create a customer profile.
- CommerceCheckoutTestProcess::testCommerceCheckoutAccessPages in modules/
checkout/ tests/ commerce_checkout.test - Test order completion page access.
- CommerceCheckoutTestProcess::testCommerceCheckoutProcessAnonymousExistingUser in modules/
checkout/ tests/ commerce_checkout.test - Test the checkout process with anonymous user using an e-mail address that belongs to an existing user, the final result should be the order assigned to the existing user.
- CommerceCheckoutTestProcess::testCommerceCheckoutProcessAnonymousNonExistingUser in modules/
checkout/ tests/ commerce_checkout.test - Test the checkout process with anonymous user using an e-mail addres that doesn't exists in the system, the final result is that the user gets the account created and the order is assigned to that user.
- CommerceCheckoutTestProcess::testCommerceCheckoutProcessAnonymousUser in modules/
checkout/ tests/ commerce_checkout.test - Test the checkout process with anonymous user.
File
- tests/
commerce_base.test, line 638 - Defines abstract base test class for the Commerce module tests.
Class
- CommerceBaseTestCase
- Abstract class for Commerce testing. All Commerce tests should extend this class.
Code
protected function generateAddressInformation() {
$address_info['name_line'] = $this
->randomName();
$address_info['thoroughfare'] = $this
->randomName();
$address_info['locality'] = $this
->randomName();
$address_info['postal_code'] = rand(00, 99999);
$address_info['administrative_area'] = 'KY';
return $address_info;
}