1
0
mirror of https://github.com/danog/class-finder.git synced 2024-11-30 04:29:03 +01:00

Add test confirming that support must be enabled.

This commit is contained in:
Hayden Pierce 2018-10-21 14:30:53 -05:00
parent 39676ce186
commit 7f187675fb

View File

@ -29,6 +29,7 @@ class FilesTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expected, $classes, $message); $this->assertEquals($expected, $classes, $message);
} }
public function classFinderDataProvider() public function classFinderDataProvider()
{ {
return array( return array(
@ -53,4 +54,15 @@ class FilesTest extends \PHPUnit_Framework_TestCase
) )
); );
} }
/**
* @expectedException HaydenPierce\ClassFinder\Exception\ClassFinderException
* @expectedExceptionMessageRegExp /Unknown namespace 'TestApp1\\FilesClasses'\./
*/
public function testFilesSupportRequiresEnabling()
{
ClassFinder::disableFilesSupport(); // Disabling FilesSupport should cause no files to be found.
$classes = ClassFinder::getClassesInNamespace('TestApp1\FilesClasses');
}
} }