mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fix tests by passing proper working directory to processes
This commit is contained in:
parent
6f61d95829
commit
4af69c85ca
2 changed files with 5 additions and 5 deletions
|
@ -75,7 +75,8 @@ class ArchiveManagerTest extends ArchiverTest
|
|||
$currentWorkDir = getcwd();
|
||||
chdir($this->testDir);
|
||||
|
||||
$result = $this->process->execute('git init -q');
|
||||
$output = null;
|
||||
$result = $this->process->execute('git init -q', $output, $this->testDir);
|
||||
if ($result > 0) {
|
||||
chdir($currentWorkDir);
|
||||
throw new \RuntimeException('Could not init: '.$this->process->getErrorOutput());
|
||||
|
@ -87,7 +88,7 @@ class ArchiveManagerTest extends ArchiverTest
|
|||
throw new \RuntimeException('Could not save file.');
|
||||
}
|
||||
|
||||
$result = $this->process->execute('git add b && git commit -m "commit b" -q');
|
||||
$result = $this->process->execute('git add b && git commit -m "commit b" -q', $output, $this->testDir);
|
||||
if ($result > 0) {
|
||||
chdir($currentWorkDir);
|
||||
throw new \RuntimeException('Could not commit: '.$this->process->getErrorOutput());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue