Completed
Push — master ( c29848...6d2813 )
by Gabriel
02:24
created

UrlTest::data_isValid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Nip\Utility\Tests;
4
5
use Nip\Utility\Url;
6
7
/**
8
 * Class StrTest
9
 * @package Nip\Utility\Tests
10
 */
11
class UrlTest extends AbstractTest
12
{
13
14
    /**
15
     * @dataProvider data_isValid()
16
     * @param $url
17
     * @param $output
18
     */
19
    public function test_isValid($url, $absolute, $output)
20
    {
21
        self::assertSame($output, Url::isValid($url, $absolute));
22
    }
23
24
    /**
25
     * @return array
26
     */
27
    public function data_isValid()
28
    {
29
        return [
30
            ['test', true, false],
31
            ['google.ro', true, false],
32
            ['http://google.ro', true, true],
33
        ];
34
    }
35
}
36