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
b0369879
Commit
b0369879
authored
Jun 05, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
33fecefd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
MultiJoinTestCase.php
tests/Query/MultiJoinTestCase.php
+12
-6
No files found.
tests/Query/MultiJoinTestCase.php
View file @
b0369879
...
...
@@ -30,8 +30,10 @@
* @since 1.0
* @version $Revision$
*/
class
Doctrine_Query_MultiJoin_TestCase
extends
Doctrine_UnitTestCase
{
public
function
testInitializeData
()
{
class
Doctrine_Query_MultiJoin_TestCase
extends
Doctrine_UnitTestCase
{
public
function
testInitializeData
()
{
$query
=
new
Doctrine_Query
(
$this
->
connection
);
...
...
@@ -77,7 +79,8 @@ class Doctrine_Query_MultiJoin_TestCase extends Doctrine_UnitTestCase {
$this
->
assertEqual
(
count
(
$user
->
Album
[
0
]
->
Song
),
0
);
$this
->
assertEqual
(
count
(
$user
->
Album
[
1
]
->
Song
),
2
);
}
public
function
testMultipleOneToManyFetching
()
{
public
function
testMultipleOneToManyFetching
()
{
$this
->
connection
->
clear
();
$query
=
new
Doctrine_Query
();
...
...
@@ -111,7 +114,8 @@ class Doctrine_Query_MultiJoin_TestCase extends Doctrine_UnitTestCase {
$this
->
assertEqual
(
$users
[
1
]
->
Phonenumber
[
2
]
->
phonenumber
,
'789 789'
);
}
public
function
testInitializeMoreData
()
{
public
function
testInitializeMoreData
()
{
$user
=
$this
->
connection
->
getTable
(
'User'
)
->
find
(
4
);
$user
->
Book
[
0
]
->
name
=
'The Prince'
;
$user
->
Book
[
0
]
->
Author
[
0
]
->
name
=
'Niccolo Machiavelli'
;
...
...
@@ -134,7 +138,8 @@ class Doctrine_Query_MultiJoin_TestCase extends Doctrine_UnitTestCase {
$this
->
connection
->
clear
();
}
public
function
testMultipleOneToManyFetching2
()
{
public
function
testMultipleOneToManyFetching2
()
{
$query
=
new
Doctrine_Query
();
$users
=
$query
->
query
(
"FROM User.Album.Song, User.Book.Author WHERE User.id IN (4,5)"
);
...
...
@@ -172,7 +177,8 @@ class Doctrine_Query_MultiJoin_TestCase extends Doctrine_UnitTestCase {
$this
->
assertEqual
(
$users
[
1
]
->
Book
[
1
]
->
Author
[
1
]
->
name
,
'Voltaire'
);
}
public
function
testMultipleOneToManyFetchingWithOrderBy
()
{
public
function
testMultipleOneToManyFetchingWithOrderBy
()
{
$query
=
new
Doctrine_Query
();
$users
=
$query
->
query
(
"FROM User.Album.Song WHERE User.id IN (4,5) ORDER BY User.Album.Song.title DESC"
);
...
...
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