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

Create an impossible rule when trying to install something that doesn't exist.

The rule isn't acted upon yet (hence the incomplete test) but it is there as a reminder that this case needs to be handled.
This commit is contained in:
Volker Dusch 2012-02-19 14:55:14 +01:00
parent c97a33577b
commit eafe13d5a5
2 changed files with 22 additions and 0 deletions

View file

@ -55,6 +55,22 @@ class SolverTest extends TestCase
));
}
public function testInstallNonExistingPackageFails()
{
$this->repo->addPackage($this->getPackage('A', '1.0'));
$this->reposComplete();
$this->request->install('B');
try {
$transaction = $this->solver->solve($this->request);
$this->markTestIncomplete('Reporting this failure is not implemented/working yet');
//$this->fail('Unsolvable conflict did not resolve in exception.');
} catch (SolverProblemsException $e) {
// @todo: assert problem properties
}
}
public function testSolverInstallWithDeps()
{
$this->repo->addPackage($packageA = $this->getPackage('A', '1.0'));