Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
221
Merge Requests
221
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
d98102d1
Commit
d98102d1
authored
Jun 04, 2009
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#473876
by Berdir: fixed broken query on PostgreSQL.
parent
33e466a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
modules/simpletest/tests/database_test.test
modules/simpletest/tests/database_test.test
+6
-5
No files found.
modules/simpletest/tests/database_test.test
View file @
d98102d1
...
...
@@ -1763,7 +1763,7 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase {
$ages
=
$outer_query
->
execute
()
->
fetchCol
();
$this
->
assertEqual
(
$ages
,
array
(
25
,
26
,
27
,
28
),
'Inner pager query returned the correct ages.'
);
$this
->
assertEqual
(
$ages
,
array
(
25
,
26
,
27
,
28
),
t
(
'Inner pager query returned the correct ages.'
)
);
}
/**
...
...
@@ -1774,15 +1774,16 @@ class DatabaseSelectPagerDefaultTestCase extends DatabaseTestCase {
function
testHavingPagerQuery
()
{
$query
=
db_select
(
'test'
,
't'
)
->
extend
(
'PagerDefault'
);
$query
->
fields
(
't'
,
array
(
'age'
))
->
orderBy
(
'age'
)
->
having
(
'COUNT(age) > :count'
,
array
(
':count'
=>
1
))
->
fields
(
't'
,
array
(
'name'
))
->
orderBy
(
'name'
)
->
groupBy
(
'name'
)
->
having
(
'MAX(age) > :count'
,
array
(
':count'
=>
26
))
->
limit
(
5
);
$ages
=
$query
->
execute
()
->
fetchCol
();
$this
->
assertEqual
(
$ages
,
array
(
25
),
' pager query with having expression returned the correct ages.'
);
$this
->
assertEqual
(
$ages
,
array
(
'George'
,
'Ringo'
),
t
(
'Pager query with having expression returned the correct ages.'
)
);
}
}
...
...
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