Passed
Pull Request — master (#1)
by
unknown
02:04
created

EmailTest::filterNotValid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace TraderInteractive\Filter;
4
5
use PHPUnit\Framework\TestCase;
6
7
/**
8
 * @coversDefaultClass \TraderInteractive\Filter\Email
9
 */
10
final class EmailTest extends TestCase
11
{
12
    /**
13
     * @test
14
     * @covers ::filter
15
     */
16
    public function filter()
17
    {
18
        $email = '[email protected]';
19
        $this->assertSame($email, Email::filter($email));
20
    }
21
22
    /**
23
     * @test
24
     * @expectedException \TraderInteractive\Exceptions\FilterException
25
     * @expectedExceptionMessage Value '@email.com' is not a valid email
26
     * @covers ::filter
27
     */
28
    public function filterNotValid()
29
    {
30
        Email::filter('@email.com');
31
    }
32
}
33