コード例 #1
0
 protected static function checkoutRepo($rev = 3)
 {
     $command = new SvnCheckoutCommand(self::$cwd, self::$url);
     if ($rev) {
         $command->rev($rev);
     }
     $ret_val = -1;
     $output = $command->runCommand($ret_val);
     self::assertSame(0, $ret_val, "Could not check out repository - return code {$ret_val}\n\n" . "Message:\n" . implode("", $output));
 }
コード例 #2
0
 public function testCanCheckoutRepository()
 {
     // Check that the repo does not exist yet
     self::assertFalse(file_exists($this->getCwdPath("trunk/TestClass2.php")));
     // Construct the command
     $command = new SvnCheckoutCommand($this->getCwd(), $this->getUrl());
     // Run the command
     $ret_val = -1;
     $command->runCommand($ret_val);
     // Assert that the command was successfully run
     self::assertSame(0, $ret_val);
     // Assert that the Repo was successfully checked out
     self::assertTrue(file_exists($this->getCwdPath("trunk/TestClass2.php")));
     // Assert that it is the right file
     self::assertFileEqualsMock("trunk/TestClass2.php");
 }