Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function parentsCommand() |
||
23 | { |
||
24 | $parentsCmd = Factory::createParents(); |
||
25 | $parentsCmd->setFile('C:\\xampp\\file\\'); |
||
26 | $parentsCmd->setRev('revision'); |
||
27 | $parentsCmd->setTemplate('template'); |
||
28 | |||
29 | $file = '\'C:\xampp\file\\\''; |
||
30 | $expected = 'hg parents --rev ' . escapeshellarg('revision') . ' --template ' . escapeshellarg('template') . ' '; |
||
31 | |||
32 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
33 | $file = str_replace("'", '"', $file); |
||
34 | } |
||
35 | |||
36 | $this->assertSame($file, $parentsCmd->getFile()); |
||
37 | $this->assertSame($expected . $file, $parentsCmd->asString()); |
||
38 | } |
||
39 | } |
||
40 |