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

EmailTypeTest::testSerialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 2
b 0
f 0
nc 1
nop 3
dl 0
loc 5
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