Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function testMatch() |
||
27 | { |
||
28 | $filter = new UriWithQueryStringFilter(); |
||
29 | |||
30 | $currentUri = 'http://php-spider.org'; |
||
31 | $uri1 = new Uri('?', $currentUri); |
||
32 | $uri2 = new Uri('?foo=2', $currentUri); |
||
33 | $uri3 = new Uri('http://php-spider.org/foo?bar=baz', $currentUri); |
||
34 | $uri4 = new Uri('http://php-spider.org/foo/?bar=baz', $currentUri); |
||
35 | $uri5 = new Uri('http://php-spider.org?/foo/bar', $currentUri); |
||
36 | |||
37 | $this->assertTrue($filter->match($uri1), '->match(\'?\')'); |
||
38 | $this->assertTrue($filter->match($uri2)); |
||
39 | $this->assertTrue($filter->match($uri3)); |
||
40 | $this->assertTrue($filter->match($uri4)); |
||
41 | $this->assertTrue($filter->match($uri5)); |
||
42 | } |
||
44 |