diff --git a/tests/LoadTest.php b/tests/LoadTest.php index a70e8cb..c0a1d1a 100644 --- a/tests/LoadTest.php +++ b/tests/LoadTest.php @@ -170,6 +170,23 @@ class LoadTest extends PHPUnit_Framework_TestCase Load::autoload('DbDriver'); } + /** + * @runInSeparateProcess + */ + public function testSetExclude() + { + $reflection_prop = new ReflectionProperty('Load', 'exclude'); + $reflection_prop->setAccessible(true); + $this->assertCount(0, $reflection_prop->getValue('Load')); + Load::setExclude('dir1'); + $this->assertCount(1, $reflection_prop->getValue('Load')); + Load::setExclude(array('dir2')); + $this->assertCount(2, $reflection_prop->getValue('Load')); + + $this->assertSame(array('dir1', 'dir2'), $reflection_prop->getValue('Load')); + + } + protected function newCallback($className) {