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