function SimplenewsTestBase::randomEmail in Simplenews 8
Generates a random email address.
The generated addresses are stored in a class variable. Each generated adress is checked against this store to prevent duplicates.
@todo: Make this function redundant by modification of Simplenews. Email addresses are case sensitive, simplenews system should handle with this correctly.
19 calls to SimplenewsTestBase::randomEmail()
- SimplenewsAdministrationTest::testContentTypes in src/
Tests/ SimplenewsAdministrationTest.php - Test content type configuration.
- SimplenewsAdministrationTest::testNewsletterIssuesOverview in src/
Tests/ SimplenewsAdministrationTest.php - Test newsletter issue overview.
- SimplenewsAdministrationTest::testNewsletterSettings in src/
Tests/ SimplenewsAdministrationTest.php - Test various combinations of newsletter settings.
- SimplenewsAdministrationTest::testSubscriberStatusFilter in src/
Tests/ SimplenewsAdministrationTest.php - Test content subscription status filter in subscriber view.
- SimplenewsAdministrationTest::testSubscriptionManagement in src/
Tests/ SimplenewsAdministrationTest.php - Test newsletter subscription management.
File
- src/
Tests/ SimplenewsTestBase.php, line 65 - Simplenews test functions.
Class
- SimplenewsTestBase
- Base class for simplenews web tests.
Namespace
Drupal\simplenews\TestsCode
function randomEmail($number = 4, $prefix = 'simpletest_', $domain = 'example.com') {
$mail = mb_strtolower($this
->randomMachineName($number, $prefix) . '@' . $domain);
return $mail;
}