@@ -38,6 +38,6 @@ class Doctrine_Query_Groupby_TestCase extends Doctrine_UnitTestCase
$q->parseQuery('SELECT u.name, COUNT(p.id) count FROM User u LEFT JOIN u.Phonenumber p GROUP BY count');
$this->assertEqual($q->getQuery(),'');
$this->assertEqual($q->getQuery(),'SELECT e.id AS e__id, e.name AS e__name, COUNT(p.id) AS p__0 FROM entity e LEFT JOIN phonenumber p ON e.id = p.entity_id WHERE (e.type = 0) GROUP BY p__0');
public function testMultipleAggregateFunctionsWithMultipleComponents()
{
$q = new Doctrine_Query();
...
...
@@ -96,7 +107,8 @@ class Doctrine_Query_Select_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($q->getQuery(), 'SELECT MAX(e.id) AS e__0, MIN(e.name) AS e__1, COUNT(p.id) AS p__2 FROM entity e LEFT JOIN phonenumber p ON e.id = p.entity_id WHERE (e.type = 0)');
}
publicfunctiontestEmptySelectPart()
public function testEmptySelectPart()
{
$q = new Doctrine_Query();
...
...
@@ -108,34 +120,35 @@ class Doctrine_Query_Select_TestCase extends Doctrine_UnitTestCase
$this->pass();
}
}
*/
publicfunctiontestUnknownAggregateFunction()
{
$q=newDoctrine_Query();
try{
$q->parseQuery('SELECT UNKNOWN(u.id) FROM User');
$q->parseQuery('SELECT UNKNOWN(u.id) FROM User u');