From 2ee61dc42c030a66d794d90e63bfef855ca42cec Mon Sep 17 00:00:00 2001 From: Anton Terekhov Date: Wed, 21 Nov 2012 21:34:09 +0400 Subject: [PATCH] Small test for Load::setExclude --- tests/LoadTest.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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) {