| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function bookmarksCommand() |
||
| 23 | { |
||
| 24 | $bookmarksCmd = Factory::createBookmarks(); |
||
| 25 | $bookmarksCmd->addName('test1'); |
||
| 26 | $bookmarksCmd->addName('test2'); |
||
| 27 | $bookmarksCmd->setRev('revision'); |
||
| 28 | $bookmarksCmd->setForce(true); |
||
| 29 | $bookmarksCmd->setRename('name'); |
||
| 30 | |||
| 31 | $name = '\'test1\' \'test2\''; |
||
| 32 | $expected = 'hg bookmarks --force --rev ' . escapeshellarg('revision') . ' --rename ' . escapeshellarg('name') . ' '; |
||
| 33 | |||
| 34 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
||
| 35 | $name = str_replace("'", '"', $name); |
||
| 36 | } |
||
| 37 | |||
| 38 | $this->assertSame($name, implode(' ', $bookmarksCmd->getName())); |
||
| 39 | $this->assertSame($expected . $name, $bookmarksCmd->asString()); |
||
| 40 | } |
||
| 41 | } |
||
| 42 |