|
@@ -31,7 +31,7 @@ class GitArchiverTest extends ArchiverTest
|
|
|
|
|
|
// Test archive
|
|
|
$archiver = new GitArchiver();
|
|
|
- $archiver->archive($package->getSourceUrl(), $target, 'zip', 'master');
|
|
|
+ $archiver->archive($package->getSourceUrl(), $target, 'zip', 'master^1');
|
|
|
$this->assertFileExists($target);
|
|
|
|
|
|
unlink($target);
|
|
@@ -46,7 +46,7 @@ class GitArchiverTest extends ArchiverTest
|
|
|
|
|
|
// Test archive
|
|
|
$archiver = new GitArchiver();
|
|
|
- $archiver->archive($package->getSourceUrl(), $target, 'tar', 'master');
|
|
|
+ $archiver->archive($package->getSourceUrl(), $target, 'tar', 'master^1');
|
|
|
$this->assertFileExists($target);
|
|
|
|
|
|
unlink($target);
|
|
@@ -78,6 +78,18 @@ class GitArchiverTest extends ArchiverTest
|
|
|
throw new \RuntimeException('Could not commit: '.$this->process->getErrorOutput());
|
|
|
}
|
|
|
|
|
|
+ $result = file_put_contents('d', 'c');
|
|
|
+ if (false === $result) {
|
|
|
+ chdir($currentWorkDir);
|
|
|
+ throw new \RuntimeException('Could not save file.');
|
|
|
+ }
|
|
|
+
|
|
|
+ $result = $this->process->execute('git add d && git commit -m "commit d" -q');
|
|
|
+ if ($result > 0) {
|
|
|
+ chdir($currentWorkDir);
|
|
|
+ throw new \RuntimeException('Could not commit: '.$this->process->getErrorOutput());
|
|
|
+ }
|
|
|
+
|
|
|
chdir($currentWorkDir);
|
|
|
}
|
|
|
}
|