From fcf8e7f5155468e5615edcbb66f030a069bac2db Mon Sep 17 00:00:00 2001 From: Andreas Hennings Date: Wed, 8 Jan 2014 00:05:24 +0100 Subject: [PATCH] Random docblock improvements in AutoloadGeneratorTest. --- tests/Composer/Test/Autoload/AutoloadGeneratorTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php index 7702584ea..f63d8c82b 100644 --- a/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php +++ b/tests/Composer/Test/Autoload/AutoloadGeneratorTest.php @@ -511,6 +511,12 @@ class AutoloadGeneratorTest extends TestCase $this->assertTrue(function_exists('testFilesAutoloadOrderByDependencyRoot')); } + /** + * Test that PSR-0 and PSR-4 mappings are processed in the correct order for + * autoloading and for classmap generation: + * - The main package has priority over other packages. + * - Longer namespaces have priority over shorter namespaces. + */ public function testOverrideVendorsAutoloading() { $mainPackage = new Package('z', '1.0', '1.0'); @@ -542,8 +548,12 @@ class AutoloadGeneratorTest extends TestCase $this->fs->ensureDirectoryExists($this->vendorDir.'/a/a/src'); $this->fs->ensureDirectoryExists($this->vendorDir.'/a/a/lib/A/B'); $this->fs->ensureDirectoryExists($this->vendorDir.'/b/b/src'); + + // Define the classes A\B\C and Foo\Bar in the main package. file_put_contents($this->workingDir.'/lib/A/B/C.php', 'workingDir.'/src/classes.php', 'vendorDir.'/a/a/lib/A/B/C.php', 'vendorDir.'/a/a/classmap/classes.php', '