WritableArrayRepositoryTest.php 788 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Test\Repository;
  12. use Composer\Repository\WritableArrayRepository;
  13. use Composer\TestCase;
  14. final class WritableArrayRepositoryTest extends TestCase
  15. {
  16. public function testGetCanonicalPackagesReturnsDifferentVersionsOfSameNamedPackage()
  17. {
  18. $repository = new WritableArrayRepository();
  19. $repository->addPackage($this->getPackage('foo', 1));
  20. $repository->addPackage($this->getPackage('foo', 2));
  21. $this->assertCount(2, $repository->getCanonicalPackages());
  22. }
  23. }