PackageTest.php 824 B

123456789101112131415161718192021222324252627282930
  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\DependencyResolver;
  12. use Composer\DependencyResolver\MemoryPackage;
  13. class PackageTest extends \PHPUnit_Framework_TestCase
  14. {
  15. public function testPackage()
  16. {
  17. $package = new MemoryPackage('foo', '1', 'beta', 21);
  18. $this->assertEquals('foo', $package->getName());
  19. $this->assertEquals('1', $package->getVersion());
  20. $this->assertEquals('beta', $package->getReleaseType());
  21. $this->assertEquals(21, $package->getId());
  22. $this->assertEquals('foo-beta-1', (string) $package);
  23. }
  24. }