mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Refactoring Tests (#6849)
This commit is contained in:
parent
ecb26c7b75
commit
a4b220273e
9 changed files with 24 additions and 27 deletions
|
@ -23,7 +23,7 @@ class ArrayRepositoryTest extends TestCase
|
|||
$repo = new ArrayRepository;
|
||||
$repo->addPackage($this->getPackage('foo', '1'));
|
||||
|
||||
$this->assertEquals(1, count($repo));
|
||||
$this->assertCount(1, $repo);
|
||||
}
|
||||
|
||||
public function testRemovePackage()
|
||||
|
@ -34,11 +34,11 @@ class ArrayRepositoryTest extends TestCase
|
|||
$repo->addPackage($this->getPackage('foo', '1'));
|
||||
$repo->addPackage($package);
|
||||
|
||||
$this->assertEquals(2, count($repo));
|
||||
$this->assertCount(2, $repo);
|
||||
|
||||
$repo->removePackage($this->getPackage('foo', '1'));
|
||||
|
||||
$this->assertEquals(1, count($repo));
|
||||
$this->assertCount(1, $repo);
|
||||
$this->assertEquals(array($package), $repo->getPackages());
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ class ArrayRepositoryTest extends TestCase
|
|||
|
||||
$repo->addPackage($alias);
|
||||
|
||||
$this->assertEquals(2, count($repo));
|
||||
$this->assertCount(2, $repo);
|
||||
$this->assertTrue($repo->hasPackage($this->getPackage('foo', '1')));
|
||||
$this->assertTrue($repo->hasPackage($this->getPackage('foo', '2')));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue