1
0
mirror of https://github.com/danog/class-finder.git synced 2024-11-26 20:14:59 +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);
}
public function classFinderDataProvider()
{
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');
}
}