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