From b683aeb5860f6c4e9155f555b5397284ddfecca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Haso=C5=88?= Date: Wed, 17 Oct 2012 01:00:11 +0200 Subject: [PATCH] Fix expected values in tests for autoloader generator --- .../Test/Autoload/AutoloadGeneratorTest.php | 15 ++++++++------- .../Test/Autoload/Fixtures/autoload_classmap4.php | 2 +- .../autoload_real_files_by_dependency.php | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php index b6cb99a6b..c93f2f378 100644 --- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php +++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php @@ -322,15 +322,15 @@ class AutoloadGeneratorTest extends TestCase { $package = new Package('a', '1.0', '1.0'); $package->setAutoload(array('files' => array('root.php'))); - $package->setRequires(array(new Link('a', 'a/foo'))); + $package->setRequires(array(new Link('a', 'z/foo'))); $packages = array(); - $packages[] = $a = new Package('a/foo', '1.0', '1.0'); + $packages[] = $z = new Package('z/foo', '1.0', '1.0'); $packages[] = $b = new Package('b/bar', '1.0', '1.0'); $packages[] = $c = new Package('c/lorem', '1.0', '1.0'); - $a->setAutoload(array('files' => array('testA.php'))); - $a->setRequires(array(new Link('a/foo', 'c/lorem'))); + $z->setAutoload(array('files' => array('testA.php'))); + $z->setRequires(array(new Link('z/foo', 'c/lorem'))); $b->setAutoload(array('files' => array('testB.php'))); $b->setRequires(array(new Link('b/bar', 'c/lorem'))); @@ -341,10 +341,10 @@ class AutoloadGeneratorTest extends TestCase ->method('getPackages') ->will($this->returnValue($packages)); - $this->fs->ensureDirectoryExists($this->vendorDir . '/a/foo'); + $this->fs->ensureDirectoryExists($this->vendorDir . '/z/foo'); $this->fs->ensureDirectoryExists($this->vendorDir . '/b/bar'); $this->fs->ensureDirectoryExists($this->vendorDir . '/c/lorem'); - file_put_contents($this->vendorDir . '/a/foo/testA.php', 'vendorDir . '/z/foo/testA.php', 'vendorDir . '/b/bar/testB.php', 'vendorDir . '/c/lorem/testC.php', 'workingDir . '/root.php', 'setAutoload(array('psr-0' => array('A\\B' => $this->workingDir.'/lib'))); + $package->setRequires(array(new Link('z', 'a/a'))); $packages = array(); $packages[] = $a = new Package('a/a', '1.0', '1.0'); diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_classmap4.php b/tests/Composer/Test/Autoload/Fixtures/autoload_classmap4.php index 944a80bed..558c5e048 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_classmap4.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_classmap4.php @@ -6,7 +6,7 @@ $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); return array( - 'ClassMapBaz' => $baseDir . '/composer-test-autoload/b/b/lib/c.php', 'ClassMapFoo' => $baseDir . '/composer-test-autoload/a/a/src/a.php', 'ClassMapBar' => $baseDir . '/composer-test-autoload/b/b/src/b.php', + 'ClassMapBaz' => $baseDir . '/composer-test-autoload/b/b/lib/c.php', ); diff --git a/tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php b/tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php index 07c8db3b4..b09592404 100644 --- a/tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php +++ b/tests/Composer/Test/Autoload/Fixtures/autoload_real_files_by_dependency.php @@ -31,7 +31,7 @@ class ComposerAutoloaderInitFilesAutoloadOrder $loader->register(); require $vendorDir . '/c/lorem/testC.php'; - require $vendorDir . '/a/foo/testA.php'; + require $vendorDir . '/z/foo/testA.php'; require $baseDir . '/root.php'; require $vendorDir . '/b/bar/testB.php';