Small test for Load::setExclude
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user