protected function SimplenewsTestBase::randomEmail in Simplenews 3.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/SimplenewsTestBase.php \Drupal\Tests\simplenews\Functional\SimplenewsTestBase::randomEmail()
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.
22 calls to SimplenewsTestBase::randomEmail()
- SimplenewsAdministrationTest::testContentTypes in tests/
src/ Functional/ SimplenewsAdministrationTest.php - Test content type configuration.
- SimplenewsAdministrationTest::testNewsletterIssuesOverview in tests/
src/ Functional/ SimplenewsAdministrationTest.php - Test newsletter issue overview.
- SimplenewsAdministrationTest::testNewsletterSettings in tests/
src/ Functional/ SimplenewsAdministrationTest.php - Test various combinations of newsletter settings.
- SimplenewsAdministrationTest::testSubscriberStatusFilter in tests/
src/ Functional/ SimplenewsAdministrationTest.php - Test content subscription status filter in subscriber view.
- SimplenewsAdministrationTest::testSubscriptionManagement in tests/
src/ Functional/ SimplenewsAdministrationTest.php - Test newsletter subscription management.
File
- tests/
src/ Functional/ SimplenewsTestBase.php, line 71
Class
- SimplenewsTestBase
- Base class for simplenews web tests.
Namespace
Drupal\Tests\simplenews\FunctionalCode
protected function randomEmail($number = 4, $prefix = 'simpletest_', $domain = 'example.com') {
$mail = mb_strtolower($this
->randomMachineName($number, $prefix) . '@' . $domain);
return $mail;
}