public function ClassLoaderTest::testClassExists in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest.php \Doctrine\Tests\Common\ClassLoaderTest::testClassExists()
File
- vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ ClassLoaderTest.php, line 25
Class
Namespace
Doctrine\Tests\CommonCode
public function testClassExists() {
$this
->assertFalse(ClassLoader::classExists('ClassLoaderTest\\ClassD'));
$badLoader = function ($className) {
require __DIR__ . '/ClassLoaderTest/ClassD.php';
return true;
};
spl_autoload_register($badLoader);
$this
->assertTrue(ClassLoader::classExists('ClassLoaderTest\\ClassD'));
spl_autoload_unregister($badLoader);
}