1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- /*
- * This file is part of Composer.
- *
- * (c) Nils Adermann <naderman@naderman.de>
- * Jordi Boggiano <j.boggiano@seld.be>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- namespace Composer\Repository;
- use Composer\Test\TestCase;
- use Composer\IO\NullIO;
- use Composer\Config;
- use Composer\Package\BasePackage;
- class ArtifactRepositoryTest extends TestCase
- {
- public function testExtractsConfigsFromZipArchives()
- {
- $expectedPackages = array(
- 'composer/composer-1.0.0-alpha6',
- 'composer/composer-dev-master',
- 'composer/composer-1.0.x-dev',
- 'vendor0/package0-0.0.1',
- 'vendor1/package2-4.3.2',
- );
- $coordinates = array('type' => 'artifact', 'url' => __DIR__ . '/Fixtures/artifacts');
- $repo = new ArtifactRepository($coordinates, new NullIO(), new Config());
- $foundPackages = array_map(function(BasePackage $package) {
- return "{$package->getPrettyName()}-{$package->getPrettyVersion()}";
- }, $repo->getPackages());
- $this->assertEquals($expectedPackages, $foundPackages);
- }
- }
|