Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function testComputingToParent() |
||
14 | { |
||
15 | $referencePath = __FILE__; |
||
16 | |||
17 | $computer = new RelativePathComputer($referencePath); |
||
18 | $this->assertEquals(str_repeat('..' . DIRECTORY_SEPARATOR, 1), $computer->computeToParent(dirname($referencePath))); |
||
19 | $this->assertEquals(str_repeat('..' . DIRECTORY_SEPARATOR, 3), $computer->computeToParent(dirname(dirname(dirname($referencePath))))); |
||
20 | |||
21 | $referencePath = dirname($referencePath); |
||
22 | $computer = new RelativePathComputer($referencePath); |
||
23 | $this->assertEquals(str_repeat('..' . DIRECTORY_SEPARATOR, 1), $computer->computeToParent(dirname($referencePath))); |
||
24 | $this->assertEquals(str_repeat('..' . DIRECTORY_SEPARATOR, 3), $computer->computeToParent(dirname(dirname(dirname($referencePath))))); |
||
25 | } |
||
26 | |||
35 |