mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
[ClassMapGenerator] Refine the findClasses method
The code could not throw
This commit is contained in:
parent
1726fd4d8b
commit
ff5c428d60
2 changed files with 43 additions and 30 deletions
|
@ -84,6 +84,19 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
|
|||
), ClassMapGenerator::createMap($finder));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \RuntimeException
|
||||
* @expectedExceptionMessage Could not scan for classes inside
|
||||
*/
|
||||
public function testThrowsWhenFileDoesNotExist()
|
||||
{
|
||||
$r = new \ReflectionClass('Composer\\Autoload\\ClassMapGenerator');
|
||||
$find = $r->getMethod('findClasses');
|
||||
$find->setAccessible(true);
|
||||
|
||||
$find->invoke(null, __DIR__.'/no-file');
|
||||
}
|
||||
|
||||
protected function assertEqualsNormalized($expected, $actual, $message = null)
|
||||
{
|
||||
foreach ($expected as $ns => $path) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue