1
0
mirror of synced 2024-12-16 16:16:04 +03:00
doctrine2/tests/Doctrine/Tests/Common/ClassLoaderTest.php

34 lines
1.1 KiB
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests\Common;
use Doctrine\Common\GlobalClassLoader,
Doctrine\Common\IsolatedClassLoader;
2009-06-15 22:25:47 +04:00
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');
2009-07-15 02:36:09 +04:00
$classLoader->setNamespaceSeparator('_');
$this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassA'), true);
2009-07-15 02:36:09 +04:00
$this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassA'), false);
$this->assertEquals($classLoader->loadClass('ClassLoaderTest_ClassC'), true);
}*/
}