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
9988907e
Commit
9988907e
authored
Jun 12, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed coding standard
parent
5f0198a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
MultipleAggregateValueTestCase.php
tests/Query/MultipleAggregateValueTestCase.php
+2
-2
SubqueryTestCase.php
tests/Query/SubqueryTestCase.php
+17
-17
No files found.
tests/Query/MultipleAggregateValueTestCase.php
View file @
9988907e
...
...
@@ -48,7 +48,7 @@ class Doctrine_Query_MultipleAggregateValue_TestCase extends Doctrine_UnitTestCa
public
function
testMultipleAggregateValues
()
{
$query
=
new
Doctrine_Query
();
$query
=
new
Doctrine_Query
();
$query
->
select
(
'u.*, COUNT(DISTINCT b.id) num_books, COUNT(DISTINCT a.id) num_albums'
);
$query
->
from
(
'User u'
);
$query
->
leftJoin
(
'u.Album a, u.Book b'
);
...
...
@@ -61,7 +61,7 @@ class Doctrine_Query_MultipleAggregateValue_TestCase extends Doctrine_UnitTestCa
$name
=
$user
->
name
;
$num_albums
=
$user
->
Album
[
0
]
->
num_albums
;
$num_books
=
$user
->
Book
[
0
]
->
num_books
;
}
catch
(
Doctrine_Exception
$e
)
{
}
catch
(
Doctrine_Exception
$e
)
{
$this
->
fail
();
}
...
...
tests/Query/SubqueryTestCase.php
View file @
9988907e
...
...
@@ -85,25 +85,25 @@ class Doctrine_Query_Subquery_TestCase extends Doctrine_UnitTestCase
}
public
function
testGetLimitSubqueryOrderBy
()
{
$query
=
new
Doctrine_Query
();
$query
->
select
(
'u.*, COUNT(DISTINCT a.id) num_albums'
);
$query
->
from
(
'User u, u.Album a'
);
$query
->
orderby
(
'num_albums'
);
public
function
testGetLimitSubqueryOrderBy
()
{
$query
=
new
Doctrine_Query
();
$query
->
select
(
'u.*, COUNT(DISTINCT a.id) num_albums'
);
$query
->
from
(
'User u, u.Album a'
);
$query
->
orderby
(
'num_albums'
);
try
{
// this causes getLimitSubquery() to be used, and it fails
$query
->
limit
(
5
);
try
{
// this causes getLimitSubquery() to be used, and it fails
$query
->
limit
(
5
);
$users
=
$query
->
execute
();
$count
=
$users
->
count
();
}
catch
(
Doctrine_Exception
$e
)
{
$this
->
fail
();
}
$users
=
$query
->
execute
();
$this
->
assertEqual
(
$count
,
1
);
$count
=
$users
->
count
();
}
catch
(
Doctrine_Exception
$e
)
{
$this
->
fail
();
}
$this
->
assertEqual
(
$count
,
1
);
}
}
?>
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