Fixed test to use Reflection

This commit is contained in:
Tim Nagel 2013-03-08 15:42:38 +11:00
parent bb08247ece
commit 95af84c0b8
2 changed files with 5 additions and 6 deletions

View File

@ -104,9 +104,4 @@ class DebugClassLoader
return true;
}
}
public function getClassFinder()
{
return $this->classFinder;
}
}

View File

@ -37,7 +37,11 @@ class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase
$functions = spl_autoload_functions();
foreach ($functions as $function) {
if (is_array($function) && $function[0] instanceof DebugClassLoader) {
$this->assertNotInstanceOf('Symfony\Component\ClassLoader\DebugClassLoader', $function[0]->getClassFinder());
$reflClass = new \ReflectionClass($function[0]);
$reflProp = $reflClass->getProperty('classFinder');
$reflProp->setAccessible(true);
$this->assertNotInstanceOf('Symfony\Component\ClassLoader\DebugClassLoader', $reflProp->getValue($function[0]));
return;
}
}