public function ClassLoaderTest::testClassLoader in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/ClassLoaderTest.php \Doctrine\Tests\Common\ClassLoaderTest::testClassLoader()
File
- vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ ClassLoaderTest.php, line 9
Class
Namespace
Doctrine\Tests\CommonCode
public function testClassLoader() {
$classLoader = new ClassLoader('ClassLoaderTest');
$classLoader
->setIncludePath(__DIR__);
$classLoader
->setFileExtension('.class.php');
$classLoader
->setNamespaceSeparator('_');
$this
->assertTrue($classLoader
->canLoadClass('ClassLoaderTest_ClassA'));
$this
->assertTrue($classLoader
->canLoadClass('ClassLoaderTest_ClassB'));
$this
->assertTrue($classLoader
->canLoadClass('ClassLoaderTest_ClassC'));
$this
->assertFalse($classLoader
->canLoadClass('OtherClass'));
$this
->assertEquals($classLoader
->loadClass('ClassLoaderTest_ClassA'), true);
$this
->assertEquals($classLoader
->loadClass('ClassLoaderTest_ClassB'), true);
$this
->assertEquals($classLoader
->loadClass('ClassLoaderTest_ClassC'), true);
}