Skip to content

Commit

Permalink
Fix test suite for latest composer
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Aug 30, 2012
1 parent 7439263 commit a187bf0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions tests/Composer/Installers/Test/InstallerTest.php
Expand Up @@ -3,7 +3,8 @@

use Composer\Installers\Installer;
use Composer\Util\Filesystem;
use Composer\Package\MemoryPackage;
use Composer\Package\Package;
use Composer\Package\RootPackage;
use Composer\Composer;
use Composer\Config;

Expand Down Expand Up @@ -112,7 +113,7 @@ public function dataForTestSupport()
public function testInstallPath($type, $path, $name)
{
$installer = new Installer($this->io, $this->composer);
$package = new MemoryPackage($name, '1.0.0', '1.0.0');
$package = new Package($name, '1.0.0', '1.0.0');

$package->setType($type);
$result = $installer->getInstallPath($package);
Expand Down Expand Up @@ -158,7 +159,7 @@ public function dataForTestInstallPath()
public function testGetCakePHPInstallPathException()
{
$installer = new Installer($this->io, $this->composer);
$package = new MemoryPackage('shama/ftp', '1.0.0', '1.0.0');
$package = new Package('shama/ftp', '1.0.0', '1.0.0');

$package->setType('cakephp-whoops');
$result = $installer->getInstallPath($package);
Expand All @@ -170,9 +171,9 @@ public function testGetCakePHPInstallPathException()
public function testCustomInstallPath()
{
$installer = new Installer($this->io, $this->composer);
$package = new MemoryPackage('shama/ftp', '1.0.0', '1.0.0');
$package = new Package('shama/ftp', '1.0.0', '1.0.0');
$package->setType('cakephp-plugin');
$consumerPackage = new MemoryPackage('foo/bar', '1.0.0', '1.0.0');
$consumerPackage = new RootPackage('foo/bar', '1.0.0', '1.0.0');
$this->composer->setPackage($consumerPackage);
$consumerPackage->setExtra(array(
'installer-paths' => array(
Expand All @@ -192,7 +193,7 @@ public function testCustomInstallPath()
public function testNoVendorName()
{
$installer = new Installer($this->io, $this->composer);
$package = new MemoryPackage('sfPhpunitPlugin', '1.0.0', '1.0.0');
$package = new Package('sfPhpunitPlugin', '1.0.0', '1.0.0');

$package->setType('symfony1-plugin');
$result = $installer->getInstallPath($package);
Expand Down
4 changes: 2 additions & 2 deletions tests/Composer/Installers/Test/TestCase.php
Expand Up @@ -13,7 +13,7 @@
namespace Composer\Installers\Test;

use Composer\Package\Version\VersionParser;
use Composer\Package\MemoryPackage;
use Composer\Package\Package;
use Composer\Package\AliasPackage;
use Composer\Package\LinkConstraint\VersionConstraint;
use Composer\Util\Filesystem;
Expand Down Expand Up @@ -43,7 +43,7 @@ protected function getPackage($name, $version)
{
$normVersion = self::getVersionParser()->normalize($version);

return new MemoryPackage($name, $normVersion, $version);
return new Package($name, $normVersion, $version);
}

protected function getAliasPackage($package, $version)
Expand Down

0 comments on commit a187bf0

Please sign in to comment.