public function SimplenewsKernelTest::testMasking in Simplenews 3.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/SimplenewsKernelTest.php \Drupal\Tests\simplenews\Kernel\SimplenewsKernelTest::testMasking()
- 8 tests/src/Kernel/SimplenewsKernelTest.php \Drupal\Tests\simplenews\Kernel\SimplenewsKernelTest::testMasking()
Test mail masking function.
File
- tests/
src/ Kernel/ SimplenewsKernelTest.php, line 24
Class
- SimplenewsKernelTest
- Unit tests for certain functions.
Namespace
Drupal\Tests\simplenews\KernelCode
public function testMasking() {
$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'));
}