mirror of
https://github.com/danog/class-finder.git
synced 2025-01-23 06:11:26 +01:00
Add test covering that entirely unknown namespaces throw an exception.
This commit is contained in:
parent
aa77f1f042
commit
f21e20df18
@ -112,6 +112,15 @@ class ClassFinderTest extends \PHPUnit_Framework_TestCase
|
||||
ClassFinder::getClassesInNamespace('TestApp1\DoesNotExist');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException HaydenPierce\ClassFinder\Exception\ClassFinderException
|
||||
* @expectedExceptionMessageRegExp /Unknown namespace 'DoesNotExist'\./
|
||||
*/
|
||||
public function testThrowsOnUnknownNameSpace()
|
||||
{
|
||||
ClassFinder::getClassesInNamespace('DoesNotExist');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException HaydenPierce\ClassFinder\Exception\ClassFinderException
|
||||
* @expectedExceptionMessage Could not locate composer.json. You can get around this by setting ClassFinder::$appRoot manually.
|
||||
|
Loading…
x
Reference in New Issue
Block a user