2011-04-05 15:37:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
2011-04-16 12:42:35 +00:00
|
|
|
* This file is part of Composer.
|
2011-04-05 15:37:19 +00:00
|
|
|
*
|
2011-04-16 12:42:35 +00:00
|
|
|
* (c) Nils Adermann <naderman@naderman.de>
|
|
|
|
* Jordi Boggiano <j.boggiano@seld.be>
|
2011-04-05 15:37:19 +00:00
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2011-04-17 21:45:37 +00:00
|
|
|
namespace Composer\Test\Package;
|
2011-04-05 15:37:19 +00:00
|
|
|
|
2011-04-17 21:45:37 +00:00
|
|
|
use Composer\Package\MemoryPackage;
|
2011-04-05 15:37:19 +00:00
|
|
|
|
2011-04-18 20:42:23 +00:00
|
|
|
class MemoryPackageTest extends \PHPUnit_Framework_TestCase
|
2011-04-05 15:37:19 +00:00
|
|
|
{
|
2011-04-18 20:42:23 +00:00
|
|
|
public function testMemoryPackage()
|
2011-04-05 15:37:19 +00:00
|
|
|
{
|
2011-09-25 21:58:50 +00:00
|
|
|
$package = new MemoryPackage('foo', '1-beta');
|
2011-04-05 15:37:19 +00:00
|
|
|
|
|
|
|
$this->assertEquals('foo', $package->getName());
|
2011-09-25 21:58:50 +00:00
|
|
|
$this->assertEquals('1-beta', $package->getVersion());
|
2011-04-05 15:37:19 +00:00
|
|
|
|
2011-05-22 07:08:30 +00:00
|
|
|
$this->assertEquals('foo-1-beta', (string) $package);
|
2011-04-05 15:37:19 +00:00
|
|
|
}
|
|
|
|
}
|