/**
  * @test
  */
 public function bookmarksCommand()
 {
     $bookmarksCmd = Factory::createBookmarks();
     $bookmarksCmd->addName('test1');
     $bookmarksCmd->addName('test2');
     $bookmarksCmd->setRev('revision');
     $bookmarksCmd->setForce(true);
     $bookmarksCmd->setRename('name');
     $name = '\'test1\' \'test2\'';
     $expected = 'hg bookmarks --force --rev ' . escapeshellarg('revision') . ' --rename ' . escapeshellarg('name') . ' ';
     if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         $name = str_replace("'", '"', $name);
     }
     $this->assertSame($name, implode(' ', $bookmarksCmd->getName()));
     $this->assertSame($expected . $name, $bookmarksCmd->asString());
 }