1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-08 16:17:37 +00:00

Make classmaps relative instead of absolute for file portability

This commit is contained in:
Jordi Boggiano 2012-03-10 01:59:59 +01:00
parent 27eb249aab
commit f8a09eaa3f
7 changed files with 68 additions and 49 deletions

View file

@ -160,11 +160,12 @@ class AutoloadGeneratorTest extends TestCase
file_put_contents($this->vendorDir.'/b/b/lib/c.php', '<?php class ClassMapBaz {}');
$this->generator->dump($this->repository, $package, $this->im, $this->vendorDir.'/.composer');
$this->assertTrue(file_exists($this->vendorDir.'/.composer/autoload_classmap.php'), "ClassMap file needs to be generated, even if empty.");
$this->assertEquals(array(
'ClassMapFoo' => $this->vendorDir.'/a/a/src/a.php',
'ClassMapBar' => $this->vendorDir.'/b/b/src/b.php',
'ClassMapBaz' => $this->vendorDir.'/b/b/lib/c.php',
$this->assertTrue(file_exists($this->vendorDir.'/.composer/autoload_classmap.php'), "ClassMap file needs to be generated.");
$this->assertEquals(
array(
'ClassMapFoo' => $this->workingDir.'/composer-test-autoload/a/a/src/a.php',
'ClassMapBar' => $this->workingDir.'/composer-test-autoload/b/b/src/b.php',
'ClassMapBaz' => $this->workingDir.'/composer-test-autoload/b/b/lib/c.php',
),
include ($this->vendorDir.'/.composer/autoload_classmap.php')
);