Passed
Push — master ( 818441...ffa9cd )
by Gabriel
13:43 queued 02:58
created

GeneralTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 22
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A data_valid_email() 0 6 1
A testValidEmail() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ByTIC\Validator\Tests\Functions;
6
7
use ByTIC\Validator\Tests\AbstractTest;
8
9
/**
10
 * Class GeneralTest.
11
 */
12
class GeneralTest extends AbstractTest
13
{
14
    /**
15
     * @dataProvider data_valid_email
16
     *
17
     * @param string $email
18
     * @param bool   $valid
19
     */
20
    public function testValidEmail($email, $valid)
21
    {
22
        static::assertSame(valid_email($email), $valid);
23
    }
24
25
    /**
26
     * @return array[]
27
     */
28
    public function data_valid_email()
29
    {
30
        return [
31
            ['[email protected]', true],
32
            ['[email protected]', true],
33
            ['[email protected]', false],
34
        ];
35
    }
36
}
37