Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function removeCommand() |
||
23 | { |
||
24 | $removeCmd = Factory::createRemove(); |
||
25 | $removeCmd->addFile('C:\\xampp\\file1\\'); |
||
26 | $removeCmd->addFile('C:\\xampp\\file2\\'); |
||
27 | $removeCmd->setAfter(true); |
||
28 | $removeCmd->addInclude('includePattern'); |
||
29 | $removeCmd->addExclude('excludePattern'); |
||
30 | $removeCmd->setForce(true); |
||
31 | |||
32 | $file = '\'C:\xampp\file1\\\' \'C:\xampp\file2\\\''; |
||
33 | $expected = 'hg remove --after --force --include includePattern --exclude excludePattern '; |
||
34 | |||
35 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
36 | $file = str_replace("'", '"', $file); |
||
37 | } |
||
38 | |||
39 | $this->assertSame($file, implode(' ', $removeCmd->getFile())); |
||
40 | $this->assertSame($expected . $file, $removeCmd->asString()); |
||
41 | } |
||
42 | } |
||
43 |