Merge pull request #1827 from pulse00/exitcode-patch
Return different error code for SolverProblemsExceptionpull/1825/merge
commit
028d95db63
|
@ -25,7 +25,7 @@ class SolverProblemsException extends \RuntimeException
|
|||
$this->problems = $problems;
|
||||
$this->installedMap = $installedMap;
|
||||
|
||||
parent::__construct($this->createMessage());
|
||||
parent::__construct($this->createMessage(), 2);
|
||||
}
|
||||
|
||||
protected function createMessage()
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue