Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
a41bbbd7
Commit
a41bbbd7
authored
Jul 16, 2009
by
piccoloprincipe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0] renamed classes to more descriptive names
parent
197ed0b7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
11 deletions
+13
-11
AllTests.php
tests/Doctrine/Tests/ORM/AllTests.php
+1
-1
AllTests.php
tests/Doctrine/Tests/ORM/Functional/AllTests.php
+1
-1
ReferenceProxyTest.php
tests/Doctrine/Tests/ORM/Functional/ReferenceProxyTest.php
+5
-4
ProxyClassGeneratorTest.php
tests/Doctrine/Tests/ORM/Proxy/ProxyClassGeneratorTest.php
+6
-5
No files found.
tests/Doctrine/Tests/ORM/AllTests.php
View file @
a41bbbd7
...
...
@@ -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\ProxyClass
GeneratorTest'
);
$suite
->
addTest
(
Query\AllTests
::
suite
());
$suite
->
addTest
(
Hydration\AllTests
::
suite
());
...
...
tests/Doctrine/Tests/ORM/Functional/AllTests.php
View file @
a41bbbd7
...
...
@@ -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\
Dynamic
ProxyTest'
);
$suite
->
addTestSuite
(
'Doctrine\Tests\ORM\Functional\
Reference
ProxyTest'
);
return
$suite
;
}
...
...
tests/Doctrine/Tests/ORM/Functional/
Dynamic
ProxyTest.php
→
tests/Doctrine/Tests/ORM/Functional/
Reference
ProxyTest.php
View file @
a41bbbd7
...
...
@@ -2,16 +2,17 @@
namespace
Doctrine\Tests\ORM\Functional
;
use
Doctrine\ORM\
DynamicProxy\
Factory
;
use
Doctrine\ORM\
DynamicProxy\
Generator
;
use
Doctrine\ORM\
Proxy\Proxy
Factory
;
use
Doctrine\ORM\
Proxy\ProxyClass
Generator
;
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
Dynamic
ProxyTest
extends
\Doctrine\Tests\OrmFunctionalTestCase
class
Reference
ProxyTest
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
ProxyClass
Generator
(
$this
->
_em
));
}
public
function
testLazyLoadsFieldValuesFromDatabase
()
...
...
tests/Doctrine/Tests/ORM/
DynamicProxy/
GeneratorTest.php
→
tests/Doctrine/Tests/ORM/
Proxy/ProxyClass
GeneratorTest.php
View file @
a41bbbd7
<?php
namespace
Doctrine\Tests\ORM\
Dynamic
Proxy
;
namespace
Doctrine\Tests\ORM\Proxy
;
use
Doctrine\ORM\
DynamicProxy\
Generator
;
use
Doctrine\ORM\
Proxy\ProxyClass
Generator
;
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
ProxyClass
GeneratorTest
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
ProxyClass
Generator
(
$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
ProxyClass
Generator
(
$this
->
_emMock
);
$proxyClass
=
$generator
->
generateReferenceProxyClass
(
'Doctrine\Tests\Models\ECommerce\ECommerceShipping'
);
$this
->
assertTrue
(
is_subclass_of
(
$proxyClass
,
'\Doctrine\Tests\Models\ECommerce\ECommerceShipping'
));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment