Browse Source

Small test for Load::setExclude

master^2
Anton Terekhov 12 years ago
parent
commit
2ee61dc42c
  1. 17
      tests/LoadTest.php

17
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)
{

Loading…
Cancel
Save