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
96eaf67e
Commit
96eaf67e
authored
Feb 21, 2010
by
romanb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.0][DDC-350] Fixed. Patch provided by Christian Heinrich.
parent
ac62e4d9
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
51 deletions
+86
-51
EntityManager.php
lib/Doctrine/ORM/EntityManager.php
+62
-47
EntityManagerTest.php
tests/Doctrine/Tests/ORM/EntityManagerTest.php
+24
-4
No files found.
lib/Doctrine/ORM/EntityManager.php
View file @
96eaf67e
This diff is collapsed.
Click to expand it.
tests/Doctrine/Tests/ORM/EntityManagerTest.php
View file @
96eaf67e
...
...
@@ -56,18 +56,18 @@ class EntityManagerTest extends \Doctrine\Tests\OrmTestCase
{
$this
->
assertType
(
'\Doctrine\ORM\QueryBuilder'
,
$this
->
_em
->
createQueryBuilder
());
}
public
function
testCreateQueryBuilderAliasValid
()
{
$q
=
$this
->
_em
->
createQueryBuilder
()
->
select
(
'u'
)
->
from
(
'Doctrine\Tests\Models\CMS\CmsUser'
,
'u'
);
$q2
=
clone
$q
;
$this
->
assertEquals
(
'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u'
,
$q
->
getQuery
()
->
getDql
());
$this
->
assertEquals
(
'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u'
,
$q2
->
getQuery
()
->
getDql
());
$q3
=
clone
$q
;
$this
->
assertEquals
(
'SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u'
,
$q3
->
getQuery
()
->
getDql
());
}
...
...
@@ -83,6 +83,26 @@ class EntityManagerTest extends \Doctrine\Tests\OrmTestCase
$this
->
assertEquals
(
'SELECT 1'
,
$q
->
getDql
());
}
static
public
function
dataMethodsAffectedByNoObjectArguments
()
{
return
array
(
array
(
'persist'
),
array
(
'remove'
),
array
(
'merge'
),
array
(
'refresh'
),
array
(
'detach'
)
);
}
/**
* @dataProvider dataMethodsAffectedByNoObjectArguments
* @expectedException \InvalidArgumentException
* @param string $methodName
*/
public
function
testThrowsExceptionOnNonObjectValues
(
$methodName
)
{
$this
->
_em
->
$methodName
(
null
);
}
static
public
function
dataAffectedByErrorIfClosedException
()
{
return
array
(
...
...
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