for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TraderInteractive\Filter;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass \TraderInteractive\Filter\Email
* @covers ::<private>
*/
final class EmailTest extends TestCase
{
* @test
* @covers ::filter
public function filter()
$email = '[email protected]';
$this->assertSame($email, Email::filter($email));
}
public function filterNotString()
$this->expectException(\TraderInteractive\Exceptions\FilterException::class);
$this->expectExceptionMessage("Value '111222333444' is not a string");
Email::filter(111222333444);
public function filterNotValid()
$this->expectExceptionMessage("Value '@email.com' is not a valid email");
Email::filter('@email.com');