You are here

protected function CommerceBaseTestCase::generateEmail in Commerce Core 7

Generate a random valid email

Parameters

string $type: Domain type

Return value

string Valid email

2 calls to CommerceBaseTestCase::generateEmail()
CommerceOrderCRUDTestCase::testCommerceOrderCrud in modules/order/tests/commerce_order.test
Test the order CRUD functions.
CommerceOrderCRUDTestCase::testCommerceOrderTokens in modules/order/tests/commerce_order.test
Test order Token replacement.

File

tests/commerce_base.test, line 657
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 generateEmail($type = 'com') {
  return $this
    ->randomName() . '@' . $this
    ->randomName() . '.' . $type;
}