Passed
Push — master ( 73bfc2...a878a7 )
by Adrien
13:45 queued 10:48
created

EmailTypeTest::testParseLiteral()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 6
c 2
b 0
f 0
nc 2
nop 3
dl 0
loc 12
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace EcodevTests\Felix\Api\Scalar;
6
7
use Ecodev\Felix\Api\Scalar\EmailType;
8
9
final class EmailTypeTest extends AbstractStringBasedType
10
{
11
    public function createType(): \Ecodev\Felix\Api\Scalar\AbstractStringBasedType
12
    {
13
        return new EmailType();
14
    }
15
16
    public function getTypeName(): string
17
    {
18
        return 'Email';
19
    }
20
21
    public function providerValues(): iterable
22
    {
23
        return [
24
            ['[email protected]', '[email protected]', true],
25
            ['josé@example.com', 'josé@example.com', false],
26
            ['[email protected]', '[email protected]', false],
27
            ['john@ example.com', 'john@ example.com', false],
28
            ['root@localhost', 'root@localhost', false],
29
            ['', null, true],
30
            ['foo', 'foo', false],
31
            [null, null, true],
32
        ];
33
    }
34
}
35