public function SimplenewsUnitTest::testMasking in Simplenews 7
Same name and namespace in other branches
- 6.2 tests/simplenews.test \SimplenewsUnitTest::testMasking()
- 7.2 tests/simplenews.test \SimplenewsUnitTest::testMasking()
File
- tests/
simplenews.test, line 2956 - Simplenews test functions.
Class
- SimplenewsUnitTest
- Unit tests for certain functions.
Code
public function testMasking() {
module_load_include('inc', 'simplenews', 'includes/simplenews.subscription');
$this
->assertEqual('t*****@e*****.org', simplenews_mask_mail('test@example.org'));
$this
->assertEqual('t*****@e*****.org', simplenews_mask_mail('t@example.org'));
$this
->assertEqual('t*****@t*****.org', simplenews_mask_mail('t@test.example.org'));
$this
->assertEqual('t*****@e*****', simplenews_mask_mail('t@example'));
}