| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function archiveCommand() |
||
| 23 | { |
||
| 24 | $archiveCmd = Factory::createArchive(); |
||
| 25 | $archiveCmd->setDestination('C:\\xampp\\dest\\'); |
||
| 26 | $archiveCmd->addInclude('includePattern'); |
||
| 27 | $archiveCmd->addExclude('excludePattern'); |
||
| 28 | $archiveCmd->setSubrepos(true); |
||
| 29 | $archiveCmd->setNoDecode(true); |
||
| 30 | |||
| 31 | $destination = '\'C:\xampp\dest\\\''; |
||
| 32 | $expected = 'hg archive --no-decode --subrepos --include includePattern --exclude excludePattern '; |
||
| 33 | |||
| 34 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
| 35 | $destination = str_replace("'", '"', $destination); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->assertSame($destination, $archiveCmd->getDestination()); |
||
| 39 | $this->assertSame($expected . $destination, $archiveCmd->asString()); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |