| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | public function test_matches_path_regex() |
||
| 12 | { |
||
| 13 | $callbackUrlMatcher = new PathRegexUrlMatcher('~^/foo~'); |
||
| 14 | |||
| 15 | $this->assertTrue($callbackUrlMatcher->matches(Url::createFromString('http://my-project/foo'))); |
||
| 16 | $this->assertTrue($callbackUrlMatcher->matches(Url::createFromString('http://my-project/foo/bat'))); |
||
| 17 | $this->assertFalse($callbackUrlMatcher->matches(Url::createFromString('http://my-project/bar'))); |
||
| 18 | $this->assertFalse($callbackUrlMatcher->matches(Url::createFromString('http://my-project/bar/foo'))); |
||
| 19 | } |
||
| 20 | } |