| @@ 76-83 (lines=8) @@ | ||
| 73 | * |
|
| 74 | * @dataProvider analyseProvider |
|
| 75 | */ |
|
| 76 | public function testAnalyseURI($level, $uri, $expectedFixedUpURI) |
|
| 77 | { |
|
| 78 | $matcher = new URIElementMatcher([$level]); |
|
| 79 | $matcher->setRequest( |
|
| 80 | new SimplifiedRequest(['pathinfo' => $uri]) |
|
| 81 | ); |
|
| 82 | $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * @param int $level |
|
| @@ 92-99 (lines=8) @@ | ||
| 89 | * |
|
| 90 | * @dataProvider analyseProvider |
|
| 91 | */ |
|
| 92 | public function testAnalyseURILevelAsInt($level, $uri, $expectedFixedUpURI) |
|
| 93 | { |
|
| 94 | $matcher = new URIElementMatcher($level); |
|
| 95 | $matcher->setRequest( |
|
| 96 | new SimplifiedRequest(['pathinfo' => $uri]) |
|
| 97 | ); |
|
| 98 | $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); |
|
| 99 | } |
|
| 100 | ||
| 101 | /** |
|
| 102 | * @param int $level |
|
| @@ 108-115 (lines=8) @@ | ||
| 105 | * |
|
| 106 | * @dataProvider analyseProvider |
|
| 107 | */ |
|
| 108 | public function testAnalyseLink($level, $fullUri, $linkUri) |
|
| 109 | { |
|
| 110 | $matcher = new URIElementMatcher([$level]); |
|
| 111 | $matcher->setRequest( |
|
| 112 | new SimplifiedRequest(['pathinfo' => $fullUri]) |
|
| 113 | ); |
|
| 114 | $this->assertSame($fullUri, $matcher->analyseLink($linkUri)); |
|
| 115 | } |
|
| 116 | ||
| 117 | public function analyseProvider() |
|
| 118 | { |
|
| @@ 81-88 (lines=8) @@ | ||
| 78 | * |
|
| 79 | * @dataProvider analyseProvider |
|
| 80 | */ |
|
| 81 | public function testAnalyseURI($uri, $expectedFixedUpURI) |
|
| 82 | { |
|
| 83 | $matcher = new URIElementMatcher([1]); |
|
| 84 | $matcher->setRequest( |
|
| 85 | new SimplifiedRequest(['pathinfo' => $uri]) |
|
| 86 | ); |
|
| 87 | $this->assertSame($expectedFixedUpURI, $matcher->analyseURI($uri)); |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * @param string $fullUri |
|
| @@ 96-103 (lines=8) @@ | ||
| 93 | * |
|
| 94 | * @dataProvider analyseProvider |
|
| 95 | */ |
|
| 96 | public function testAnalyseLink($fullUri, $linkUri) |
|
| 97 | { |
|
| 98 | $matcher = new URIElementMatcher([1]); |
|
| 99 | $matcher->setRequest( |
|
| 100 | new SimplifiedRequest(['pathinfo' => $fullUri]) |
|
| 101 | ); |
|
| 102 | $this->assertSame($fullUri, $matcher->analyseLink($linkUri)); |
|
| 103 | } |
|
| 104 | ||
| 105 | public function analyseProvider() |
|
| 106 | { |
|