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

Adjust dump command, add another test, update docs, refs #1344

This commit is contained in:
Jordi Boggiano 2014-03-01 20:39:06 +01:00
parent 023ff131aa
commit 790a25c348
7 changed files with 32 additions and 21 deletions

View file

@ -170,7 +170,7 @@ class AutoloadGeneratorTest extends TestCase
// Assert that autoload_classmap.php was correctly generated.
$this->assertAutoloadFiles('classmap', $this->vendorDir.'/composer', 'classmap');
}
public function testMainPackageDevAutoloading()
{
$package = new Package('a', '1.0', '1.0');
@ -181,6 +181,9 @@ class AutoloadGeneratorTest extends TestCase
));
$package->setDevAutoload(array(
'files' => array('devfiles/foo.php'),
'psr-0' => array(
'Main' => 'tests/'
),
));
$this->repository->expects($this->once())
@ -197,11 +200,11 @@ class AutoloadGeneratorTest extends TestCase
// generate autoload files with the dev mode set to true
$this->generator->setDevMode(true);
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', true, '_1');
// check standard autoload
$this->assertAutoloadFiles('main4', $this->vendorDir.'/composer');
$this->assertAutoloadFiles('main5', $this->vendorDir.'/composer');
$this->assertAutoloadFiles('classmap7', $this->vendorDir.'/composer', 'classmap');
// make sure dev autoload is correctly dumped
$this->assertAutoloadFiles('files2', $this->vendorDir.'/composer', 'files');
}
@ -238,7 +241,7 @@ class AutoloadGeneratorTest extends TestCase
// make sure dev autoload is disabled when dev mode is set to false
$this->assertFalse(is_file($this->vendorDir.'/composer/autoload_files.php'));
}
public function testVendorDirSameAsWorkingDir()
{
$this->vendorDir = $this->workingDir;