1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Generate an autoload_files.php next to autoload_namespaces.php and autoload_classes.php

This commit is contained in:
Andreas Hennings 2013-07-23 13:48:55 +02:00
parent 5b042943e3
commit f98a8f472e
9 changed files with 37 additions and 17 deletions

View file

@ -191,6 +191,7 @@ class AutoloadGeneratorTest extends TestCase
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'TargetDir');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_target_dir.php', $this->vendorDir.'/autoload.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_target_dir.php', $this->vendorDir.'/composer/autoload_real.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_files_target_dir.php', $this->vendorDir.'/composer/autoload_files.php');
$this->assertAutoloadFiles('classmap6', $this->vendorDir.'/composer', 'classmap');
}
@ -374,6 +375,7 @@ class AutoloadGeneratorTest extends TestCase
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'FilesAutoload');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_functions.php', $this->vendorDir.'/autoload.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_functions.php', $this->vendorDir.'/composer/autoload_real.php');
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_files_functions.php', $this->vendorDir.'/composer/autoload_files.php');
include $this->vendorDir . '/autoload.php';
$this->assertTrue(function_exists('testFilesAutoloadGeneration1'));
@ -753,8 +755,8 @@ EOF;
$this->assertEquals($expectedNamespace, file_get_contents($vendorDir.'/composer/autoload_namespaces.php'));
$this->assertEquals($expectedClassmap, file_get_contents($vendorDir.'/composer/autoload_classmap.php'));
$this->assertContains("require \$vendorDir . '/b/b/bootstrap.php';", file_get_contents($vendorDir.'/composer/autoload_real.php'));
$this->assertContains("require \$baseDir . '/test.php';", file_get_contents($vendorDir.'/composer/autoload_real.php'));
$this->assertContains("require \$vendorDir . '/b/b/bootstrap.php';", file_get_contents($vendorDir.'/composer/autoload_files.php'));
$this->assertContains("require \$baseDir . '/test.php';", file_get_contents($vendorDir.'/composer/autoload_files.php'));
}
public function testUpLevelRelativePaths()
@ -813,7 +815,7 @@ EOF;
$this->assertEquals($expectedNamespace, file_get_contents($this->vendorDir.'/composer/autoload_namespaces.php'));
$this->assertEquals($expectedClassmap, file_get_contents($this->vendorDir.'/composer/autoload_classmap.php'));
$this->assertContains("require \$baseDir . '/../test.php';", file_get_contents($this->vendorDir.'/composer/autoload_real.php'));
$this->assertContains("require \$baseDir . '/../test.php';", file_get_contents($this->vendorDir.'/composer/autoload_files.php'));
}
public function testEmptyPaths()