for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* integer_net Magento Module
*
* @category IntegerNet
* @package IntegerNet
* @copyright Copyright (c) 2016 integer_net GmbH (http://www.integer-net.de/)
* @author Fabian Schmengler <[email protected]>
*/
namespace IntegerNet\Anonymizer\Config;
class ExcludedEmailDomainsTest extends \PHPUnit_Framework_TestCase
{
* @dataProvider dataIsExcluded
public function testIsExcluded($domains, $excluded, $notExcluded)
$excludedEmailDomains = new ExcludedEmailDomains($domains);
foreach ($excluded as $ex) {
$this->assertTrue($excludedEmailDomains->matches($ex));
}
foreach ($notExcluded as $notEx) {
$this->assertFalse($excludedEmailDomains->matches($notEx));
public static function dataIsExcluded()
return [
[
'domains' => ['project.tld', 'agency.tld', 'subdomain.domain.tld'],
'excluded' => ['[email protected]', '[email protected]', '[email protected]'],
'not_excluded' => ['[email protected]', '[email protected]', '[email protected]', '[email protected]'],
],
];