mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fix PSR-4 autoload classmap generator
This commit is contained in:
parent
e060adeb97
commit
01cd990995
3 changed files with 7 additions and 3 deletions
|
@ -111,17 +111,19 @@ class AutoloadGeneratorTest extends TestCase
|
|||
->will($this->returnValue(array()));
|
||||
|
||||
$this->fs->ensureDirectoryExists($this->workingDir.'/composer');
|
||||
$this->fs->ensureDirectoryExists($this->workingDir.'/src');
|
||||
$this->fs->ensureDirectoryExists($this->workingDir.'/src/Lala');
|
||||
$this->fs->ensureDirectoryExists($this->workingDir.'/lib');
|
||||
file_put_contents($this->workingDir.'/src/Lala/ClassMapMain.php', '<?php namespace Lala; class ClassMapMain {}');
|
||||
|
||||
$this->fs->ensureDirectoryExists($this->workingDir.'/src-fruit');
|
||||
$this->fs->ensureDirectoryExists($this->workingDir.'/src-cake');
|
||||
$this->fs->ensureDirectoryExists($this->workingDir.'/lib-cake');
|
||||
file_put_contents($this->workingDir.'/src-cake/ClassMapBar.php', '<?php namespace Acme\Cake; class ClassMapBar {}');
|
||||
|
||||
$this->fs->ensureDirectoryExists($this->workingDir.'/composersrc');
|
||||
file_put_contents($this->workingDir.'/composersrc/foo.php', '<?php class ClassMapFoo {}');
|
||||
|
||||
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', false, '_1');
|
||||
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', true, '_1');
|
||||
|
||||
// Assert that autoload_namespaces.php was correctly generated.
|
||||
$this->assertAutoloadFiles('main', $this->vendorDir.'/composer');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue