[2.0] renamed classes to more descriptive names
This commit is contained in:
parent
197ed0b7b6
commit
a41bbbd7e1
@ -32,7 +32,7 @@ class AllTests
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\EntityManagerTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\CommitOrderCalculatorTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\QueryBuilderTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\DynamicProxy\GeneratorTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\Proxy\ProxyClassGeneratorTest');
|
||||
|
||||
$suite->addTest(Query\AllTests::suite());
|
||||
$suite->addTest(Hydration\AllTests::suite());
|
||||
|
@ -34,7 +34,7 @@ class AllTests
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToOneSelfReferentialAssociationTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToManySelfReferentialAssociationTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\ManyToManySelfReferentialAssociationTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\DynamicProxyTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\ReferenceProxyTest');
|
||||
|
||||
return $suite;
|
||||
}
|
||||
|
@ -2,16 +2,17 @@
|
||||
|
||||
namespace Doctrine\Tests\ORM\Functional;
|
||||
|
||||
use Doctrine\ORM\DynamicProxy\Factory;
|
||||
use Doctrine\ORM\DynamicProxy\Generator;
|
||||
use Doctrine\ORM\Proxy\ProxyFactory;
|
||||
use Doctrine\ORM\Proxy\ProxyClassGenerator;
|
||||
use Doctrine\Tests\Models\ECommerce\ECommerceProduct;
|
||||
|
||||
require_once __DIR__ . '/../../TestInit.php';
|
||||
|
||||
/**
|
||||
* Tests the generation of a proxy object for lazy loading.
|
||||
* @author Giorgio Sironi <piccoloprincipeazzurro@gmail.com>
|
||||
*/
|
||||
class DynamicProxyTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
class ReferenceProxyTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
{
|
||||
private $product;
|
||||
|
||||
@ -19,7 +20,7 @@ class DynamicProxyTest extends \Doctrine\Tests\OrmFunctionalTestCase
|
||||
{
|
||||
$this->useModelSet('ecommerce');
|
||||
parent::setUp();
|
||||
$this->_factory = new Factory($this->_em, new Generator($this->_em));
|
||||
$this->_factory = new ProxyFactory($this->_em, new ProxyClassGenerator($this->_em));
|
||||
}
|
||||
|
||||
public function testLazyLoadsFieldValuesFromDatabase()
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Doctrine\Tests\ORM\DynamicProxy;
|
||||
namespace Doctrine\Tests\ORM\Proxy;
|
||||
|
||||
use Doctrine\ORM\DynamicProxy\Generator;
|
||||
use Doctrine\ORM\Proxy\ProxyClassGenerator;
|
||||
use Doctrine\Tests\Mocks\ConnectionMock;
|
||||
use Doctrine\Tests\Mocks\EntityManagerMock;
|
||||
use Doctrine\Tests\Models\ECommerce\ECommerceCart;
|
||||
@ -14,8 +14,9 @@ require_once __DIR__ . '/../../TestInit.php';
|
||||
|
||||
/**
|
||||
* Test the proxy generator. Its work is generating on-the-fly subclasses of a given model, which implement the Proxy pattern.
|
||||
* @author Giorgio Sironi <piccoloprincipeazzurro@gmail.com>
|
||||
*/
|
||||
class GeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||
class ProxyClassGeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||
{
|
||||
private $_connectionMock;
|
||||
private $_emMock;
|
||||
@ -27,7 +28,7 @@ class GeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||
// SUT
|
||||
$this->_connectionMock = new ConnectionMock(array(), new \Doctrine\Tests\Mocks\DriverMock());
|
||||
$this->_emMock = EntityManagerMock::create($this->_connectionMock);
|
||||
$this->_generator = new Generator($this->_emMock, __DIR__ . '/generated');
|
||||
$this->_generator = new ProxyClassGenerator($this->_emMock, __DIR__ . '/generated');
|
||||
}
|
||||
|
||||
protected function tearDown()
|
||||
@ -47,7 +48,7 @@ class GeneratorTest extends \Doctrine\Tests\OrmTestCase
|
||||
|
||||
public function testCanGuessADefaultTempFolder()
|
||||
{
|
||||
$generator = new Generator($this->_emMock);
|
||||
$generator = new ProxyClassGenerator($this->_emMock);
|
||||
$proxyClass = $generator->generateReferenceProxyClass('Doctrine\Tests\Models\ECommerce\ECommerceShipping');
|
||||
$this->assertTrue(is_subclass_of($proxyClass, '\Doctrine\Tests\Models\ECommerce\ECommerceShipping'));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user