1
0
mirror of synced 2024-12-13 14:56:01 +03:00
doctrine2/tests/Doctrine/Tests/Common/ClassLoaderTest.php

34 lines
1.1 KiB
PHP

<?php
namespace Doctrine\Tests\Common;
use Doctrine\Common\GlobalClassLoader,
Doctrine\Common\IsolatedClassLoader;
require_once __DIR__ . '/../TestInit.php';
class ClassLoaderTest extends \Doctrine\Tests\DoctrineTestCase
{
public function testGlobalClassLoaderThrowsExceptionIfPutInChain()
{
$this->setExpectedException('Doctrine\Common\DoctrineException');
$classLoader1 = new IsolatedClassLoader('Foo');
$classLoader1->register();
$globalClassLoader = new GlobalClassLoader;
$globalClassLoader->register();
}
/*public function testIsolatedClassLoaderReturnsFalseOnClassExists()
{
$classLoader = new IsolatedClassLoader('ClassLoaderTest');
$classLoader->setBasePath( __DIR__);
$classLoader->setFileExtension('.class.php');
$classLoader->setNamespaceSeparator('_');
$this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassA'), true);
$this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassA'), false);
$this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassC'), true);
}*/
}