* Small improvement of the testExcludeFromClassmap unit test
parent
dad6b05ca7
commit
98de300878
|
@ -1207,7 +1207,7 @@ EOF;
|
||||||
'Acme\Cake\\' => array('src-cake/', 'lib-cake/'),
|
'Acme\Cake\\' => array('src-cake/', 'lib-cake/'),
|
||||||
),
|
),
|
||||||
'classmap' => array('composersrc/'),
|
'classmap' => array('composersrc/'),
|
||||||
'exclude-from-classmap' => array('/tests/'),
|
'exclude-from-classmap' => array('/tests/', 'Exclude.php'),
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->repository->expects($this->once())
|
$this->repository->expects($this->once())
|
||||||
|
@ -1225,11 +1225,12 @@ EOF;
|
||||||
file_put_contents($this->workingDir.'/src-cake/ClassMapBar.php', '<?php namespace Acme\Cake; class ClassMapBar {}');
|
file_put_contents($this->workingDir.'/src-cake/ClassMapBar.php', '<?php namespace Acme\Cake; class ClassMapBar {}');
|
||||||
|
|
||||||
$this->fs->ensureDirectoryExists($this->workingDir.'/composersrc');
|
$this->fs->ensureDirectoryExists($this->workingDir.'/composersrc');
|
||||||
|
$this->fs->ensureDirectoryExists($this->workingDir.'/composersrc/tests');
|
||||||
file_put_contents($this->workingDir.'/composersrc/foo.php', '<?php class ClassMapFoo {}');
|
file_put_contents($this->workingDir.'/composersrc/foo.php', '<?php class ClassMapFoo {}');
|
||||||
|
|
||||||
// this class should not be found in the classmap
|
// this classes should not be found in the classmap
|
||||||
$this->fs->ensureDirectoryExists($this->workingDir.'/composersrc/tests');
|
|
||||||
file_put_contents($this->workingDir.'/composersrc/tests/bar.php', '<?php class ClassExcludeMapFoo {}');
|
file_put_contents($this->workingDir.'/composersrc/tests/bar.php', '<?php class ClassExcludeMapFoo {}');
|
||||||
|
file_put_contents($this->workingDir.'/composersrc/ClassToExclude.php', '<?php class ClassClassToExclude {}');
|
||||||
|
|
||||||
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', true, '_1');
|
$this->generator->dump($this->config, $this->repository, $package, $this->im, 'composer', true, '_1');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue