|
|
@ -164,6 +164,28 @@ class AutoloadGeneratorTest extends TestCase
|
|
|
|
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_target_dir.php', $this->vendorDir.'/composer/autoload_realTargetDir.php');
|
|
|
|
$this->assertFileEquals(__DIR__.'/Fixtures/autoload_real_target_dir.php', $this->vendorDir.'/composer/autoload_realTargetDir.php');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function testMainPackageAutoloadingWithTargetDirAndNoPsr()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$package = new Package('a', '1.0', '1.0');
|
|
|
|
|
|
|
|
$package->setAutoload(array(
|
|
|
|
|
|
|
|
'classmap' => array('composersrc/'),
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
$package->setTargetDir('Main/Foo/');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->repository->expects($this->once())
|
|
|
|
|
|
|
|
->method('getPackages')
|
|
|
|
|
|
|
|
->will($this->returnValue(array()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->vendorDir .= '/subdir';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->fs->ensureDirectoryExists($this->vendorDir.'/composer');
|
|
|
|
|
|
|
|
$this->fs->ensureDirectoryExists($this->workingDir.'/src');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->createClassFile($this->workingDir);
|
|
|
|
|
|
|
|
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, 'TargetDirNoPsr');
|
|
|
|
|
|
|
|
$this->assertAutoloadFiles('classmap2', $this->vendorDir.'/composer', 'classmap');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function testVendorsAutoloading()
|
|
|
|
public function testVendorsAutoloading()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$package = new Package('a', '1.0', '1.0');
|
|
|
|
$package = new Package('a', '1.0', '1.0');
|
|
|
|