Commit a41bbbd7 authored by piccoloprincipe's avatar piccoloprincipe

[2.0] renamed classes to more descriptive names

parent 197ed0b7
...@@ -32,7 +32,7 @@ class AllTests ...@@ -32,7 +32,7 @@ class AllTests
$suite->addTestSuite('Doctrine\Tests\ORM\EntityManagerTest'); $suite->addTestSuite('Doctrine\Tests\ORM\EntityManagerTest');
$suite->addTestSuite('Doctrine\Tests\ORM\CommitOrderCalculatorTest'); $suite->addTestSuite('Doctrine\Tests\ORM\CommitOrderCalculatorTest');
$suite->addTestSuite('Doctrine\Tests\ORM\QueryBuilderTest'); $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(Query\AllTests::suite());
$suite->addTest(Hydration\AllTests::suite()); $suite->addTest(Hydration\AllTests::suite());
......
...@@ -34,7 +34,7 @@ class AllTests ...@@ -34,7 +34,7 @@ class AllTests
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToOneSelfReferentialAssociationTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToOneSelfReferentialAssociationTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToManySelfReferentialAssociationTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Functional\OneToManySelfReferentialAssociationTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\ManyToManySelfReferentialAssociationTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Functional\ManyToManySelfReferentialAssociationTest');
$suite->addTestSuite('Doctrine\Tests\ORM\Functional\DynamicProxyTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Functional\ReferenceProxyTest');
return $suite; return $suite;
} }
......
...@@ -2,16 +2,17 @@ ...@@ -2,16 +2,17 @@
namespace Doctrine\Tests\ORM\Functional; namespace Doctrine\Tests\ORM\Functional;
use Doctrine\ORM\DynamicProxy\Factory; use Doctrine\ORM\Proxy\ProxyFactory;
use Doctrine\ORM\DynamicProxy\Generator; use Doctrine\ORM\Proxy\ProxyClassGenerator;
use Doctrine\Tests\Models\ECommerce\ECommerceProduct; use Doctrine\Tests\Models\ECommerce\ECommerceProduct;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
/** /**
* Tests the generation of a proxy object for lazy loading. * 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; private $product;
...@@ -19,7 +20,7 @@ class DynamicProxyTest extends \Doctrine\Tests\OrmFunctionalTestCase ...@@ -19,7 +20,7 @@ class DynamicProxyTest extends \Doctrine\Tests\OrmFunctionalTestCase
{ {
$this->useModelSet('ecommerce'); $this->useModelSet('ecommerce');
parent::setUp(); 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() public function testLazyLoadsFieldValuesFromDatabase()
......
<?php <?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\ConnectionMock;
use Doctrine\Tests\Mocks\EntityManagerMock; use Doctrine\Tests\Mocks\EntityManagerMock;
use Doctrine\Tests\Models\ECommerce\ECommerceCart; use Doctrine\Tests\Models\ECommerce\ECommerceCart;
...@@ -14,8 +14,9 @@ require_once __DIR__ . '/../../TestInit.php'; ...@@ -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. * 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 $_connectionMock;
private $_emMock; private $_emMock;
...@@ -27,7 +28,7 @@ class GeneratorTest extends \Doctrine\Tests\OrmTestCase ...@@ -27,7 +28,7 @@ class GeneratorTest extends \Doctrine\Tests\OrmTestCase
// SUT // SUT
$this->_connectionMock = new ConnectionMock(array(), new \Doctrine\Tests\Mocks\DriverMock()); $this->_connectionMock = new ConnectionMock(array(), new \Doctrine\Tests\Mocks\DriverMock());
$this->_emMock = EntityManagerMock::create($this->_connectionMock); $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() protected function tearDown()
...@@ -47,7 +48,7 @@ class GeneratorTest extends \Doctrine\Tests\OrmTestCase ...@@ -47,7 +48,7 @@ class GeneratorTest extends \Doctrine\Tests\OrmTestCase
public function testCanGuessADefaultTempFolder() public function testCanGuessADefaultTempFolder()
{ {
$generator = new Generator($this->_emMock); $generator = new ProxyClassGenerator($this->_emMock);
$proxyClass = $generator->generateReferenceProxyClass('Doctrine\Tests\Models\ECommerce\ECommerceShipping'); $proxyClass = $generator->generateReferenceProxyClass('Doctrine\Tests\Models\ECommerce\ECommerceShipping');
$this->assertTrue(is_subclass_of($proxyClass, '\Doctrine\Tests\Models\ECommerce\ECommerceShipping')); $this->assertTrue(is_subclass_of($proxyClass, '\Doctrine\Tests\Models\ECommerce\ECommerceShipping'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment