PackageTest.php 811 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Composer\Test\DependencyResolver;
  11. use Composer\DependencyResolver\MemoryPackage;
  12. class PackageTest extends \PHPUnit_Framework_TestCase
  13. {
  14. public function testPackage()
  15. {
  16. $package = new MemoryPackage('foo', '1', 'beta', 21);
  17. $this->assertEquals('foo', $package->getName());
  18. $this->assertEquals('1', $package->getVersion());
  19. $this->assertEquals('beta', $package->getReleaseType());
  20. $this->assertEquals(21, $package->getId());
  21. $this->assertEquals('foo-beta-1', (string) $package);
  22. }
  23. }