| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function initCommand() |
||
| 23 | { |
||
| 24 | $initCmd = Factory::createInit(); |
||
| 25 | $initCmd->setDestination('C:\\xampp\\dest\\'); |
||
| 26 | $initCmd->setSsh('testSSH'); |
||
| 27 | $initCmd->setInsecure(true); |
||
| 28 | $initCmd->setVerbose(true); |
||
| 29 | $initCmd->setEncoding('UTF-8'); |
||
| 30 | |||
| 31 | $destination = '\'C:\xampp\dest\\\''; |
||
| 32 | $expected = 'hg init --verbose --encoding ' . escapeshellarg('UTF-8') . ' --ssh ' . escapeshellarg('testSSH') . ' --insecure '; |
||
| 33 | |||
| 34 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
| 35 | $destination = str_replace("'", '"', $destination); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->assertSame($destination, $initCmd->getDestination()); |
||
| 39 | $this->assertSame($expected . $destination, $initCmd->asString()); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |