public function SimplenewsKernelTest::testMasking in Simplenews 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/SimplenewsKernelTest.php \Drupal\Tests\simplenews\Kernel\SimplenewsKernelTest::testMasking()
- 3.x tests/src/Kernel/SimplenewsKernelTest.php \Drupal\Tests\simplenews\Kernel\SimplenewsKernelTest::testMasking()
File
- tests/
src/ Kernel/ SimplenewsKernelTest.php, line 21
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'));
}