| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class PrefixTest extends TestCase |
||
| 9 | { |
||
| 10 | public function testPrefix() |
||
| 11 | { |
||
| 12 | $prefixMatcher = new Prefix('/full/path/to/'); |
||
| 13 | $needle = "file.php"; |
||
| 14 | $haystack = [ |
||
| 15 | '/full/path/to/someOtherFile.php', |
||
| 16 | '/full/path/to/longer/file.php', |
||
| 17 | '/full/path/to/file.php', |
||
| 18 | ]; |
||
| 19 | |||
| 20 | $this->assertEquals( |
||
| 21 | '/full/path/to/file.php', |
||
| 22 | $prefixMatcher->match($needle, $haystack) |
||
| 23 | ); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function testDoesNotExist() |
||
| 34 | } |
||
| 35 | } |
||
| 36 |