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
*/
final class EmailTest extends TestCase
{
* @test
* @covers ::filter
public function filter()
$email = '[email protected]';
$this->assertSame($email, Email::filter($email));
}
* @expectedException \TraderInteractive\Exceptions\FilterException
* @expectedExceptionMessage Value '1' is not a string
public function filterNonString()
Email::filter(1);
* @expectedExceptionMessage Value '@email.com' is not a valid email
public function filterNotValid()
Email::filter('@email.com');