| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function logCommand() |
||
| 23 | { |
||
| 24 | $logCmd = Factory::createLog(); |
||
| 25 | $logCmd->setFile('C:\\xampp\\file\\') |
||
| 26 | ->addInclude('includePattern') |
||
| 27 | ->addExclude('excludePattern') |
||
| 28 | ->setFollow(true) |
||
| 29 | ->setCopies(true); |
||
| 30 | |||
| 31 | $file = '\'C:\xampp\file\\\''; |
||
| 32 | $expected = 'hg log --follow --copies --include includePattern --exclude excludePattern '; |
||
| 33 | |||
| 34 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
| 35 | $file = str_replace("'", '"', $file); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->assertSame($file, $logCmd->getFile()); |
||
| 39 | $this->assertSame($expected . $file, $logCmd->asString()); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |