Total Complexity | 5 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | final class UrlTest extends TestCase |
||
11 | { |
||
12 | /** |
||
13 | * @test |
||
14 | * @covers ::filter |
||
15 | */ |
||
16 | public function filter() |
||
17 | { |
||
18 | $url = 'http://www.example.com'; |
||
19 | $this->assertSame($url, Url::filter($url)); |
||
20 | } |
||
21 | |||
22 | /** |
||
23 | * @test |
||
24 | * @expectedException \TraderInteractive\Exceptions\FilterException |
||
25 | * @expectedExceptionMessage Value '1' is not a valid url |
||
26 | * @covers ::filter |
||
27 | */ |
||
28 | public function filterNonString() |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @test |
||
35 | * @expectedException \TraderInteractive\Exceptions\FilterException |
||
36 | * @expectedExceptionMessage Value 'www.example.com' is not a valid url |
||
37 | * @covers ::filter |
||
38 | */ |
||
39 | public function filterNotValid() |
||
40 | { |
||
41 | Url::filter('www.example.com'); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @test |
||
46 | * @covers ::filter |
||
47 | */ |
||
48 | public function filterNullPass() |
||
51 | } |
||
52 | |||
53 | /** |
||
54 | * @test |
||
55 | * @expectedException \TraderInteractive\Exceptions\FilterException |
||
56 | * @expectedExceptionMessage Value failed filtering, $allowNull is set to false |
||
57 | * @covers ::filter |
||
58 | */ |
||
59 | public function filterNullFail() |
||
62 | } |
||
63 | } |
||
64 |