Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function addCommand() |
||
23 | { |
||
24 | $addCmd = Factory::createAdd(); |
||
25 | $addCmd->addFile('C:\\xampp\\file\\'); |
||
26 | $addCmd->addInclude('includePattern'); |
||
27 | $addCmd->addExclude('excludePattern'); |
||
28 | $addCmd->setSubrepos(true); |
||
29 | $addCmd->setDryRun(true); |
||
30 | |||
31 | $file = '\'C:\xampp\file\\\''; |
||
32 | $expected = 'hg add --include includePattern --exclude excludePattern --subrepos --dry-run '; |
||
33 | |||
34 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
35 | $file = str_replace("'", '"', $file); |
||
36 | } |
||
37 | |||
38 | $this->assertSame($file, implode(' ', $addCmd->getFile())); |
||
39 | $this->assertSame($expected . $file, $addCmd->asString()); |
||
40 | } |
||
41 | } |
||
42 |