Fix remove tests

main
Jordi Boggiano 5 years ago
parent e162cc6f0a
commit b5e34ca767
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -18,7 +18,7 @@ use Composer\Test\TestCase;
class RequestTest extends TestCase
{
public function testRequestInstallAndRemove()
public function testRequestInstall()
{
$repo = new ArrayRepository;
$foo = $this->getPackage('foo', '1');
@ -31,12 +31,10 @@ class RequestTest extends TestCase
$request = new Request();
$request->install('foo');
$request->remove('foobar');
$this->assertEquals(
array(
array('cmd' => 'install', 'packageName' => 'foo', 'constraint' => null),
array('cmd' => 'remove', 'packageName' => 'foobar', 'constraint' => null),
),
$request->getJobs()
);

@ -196,28 +196,6 @@ class SolverTest extends TestCase
$this->checkSolverResult(array());
}
public function testSolverRemoveSingle()
{
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
$this->reposComplete();
$this->request->remove('A');
$this->checkSolverResult(array(
array('job' => 'remove', 'package' => $packageA),
));
}
public function testSolverRemoveUninstalled()
{
$this->repo->addPackage($this->getPackage('A', '1.0'));
$this->reposComplete();
$this->request->remove('A');
$this->checkSolverResult(array());
}
public function testSolverUpdateDoesOnlyUpdate()
{
$this->repoLocked->addPackage($packageA = $this->getPackage('A', '1.0'));
@ -367,7 +345,6 @@ class SolverTest extends TestCase
$this->request->install('A');
$this->request->install('C');
$this->request->remove('D');
$this->checkSolverResult(array(
array('job' => 'remove', 'package' => $packageD),

Loading…
Cancel
Save