1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Return different error code for SolverProblemsException

To make it easier for external tools to detect SolverProblems and react
to them accordingly,
this PR introduces a new exit code.
This commit is contained in:
Robert Gruendler 2013-04-25 11:26:34 +02:00
parent 09e31bf704
commit 5160dd2f5e
2 changed files with 2 additions and 1 deletions

View file

@ -75,6 +75,7 @@ class SolverTest extends TestCase
} catch (SolverProblemsException $e) {
$problems = $e->getProblems();
$this->assertEquals(1, count($problems));
$this->assertEquals(2, $e->getCode());
$this->assertEquals("\n - The requested package b could not be found in any version, there may be a typo in the package name.", $problems[0]->getPrettyString());
}
}