コード例 #1
0
 /**
  * @test
  */
 public function branchCommand()
 {
     $branchCmd = Factory::createBranch();
     $branchCmd->setName('test');
     $branchCmd->setClean(true);
     $branchCmd->setForce(true);
     $name = '\'test\'';
     $expected = 'hg branch --force --clean ';
     if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         $name = str_replace("'", '"', $name);
     }
     $this->assertSame($name, $branchCmd->getName());
     $this->assertSame($expected . $name, $branchCmd->asString());
 }