for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Nip\Utility\Tests;
use Nip\Utility\Email;
/**
* Class EmailTest
* @package Nip\Utility\Tests
*/
class EmailTest extends AbstractTest
{
* @param $email
* @param $masked
* @dataProvider maskData()
public function testMask($email, $masked)
self::assertSame($masked, Email::mask($email));
}
* @return array
public function maskData()
return [
['[email protected]', 'g***@g****.com'],
['[email protected]', 's******@g****.com'],
['[email protected]', 's******@g****.c*.uk'],
['solomon@gmail', 's******@gmail'],
['solomon', 's******'],
];