Commit 689469a9 authored by pookey's avatar pookey

* Adding an orderby test case to aggregate test

parent 6a03325d
......@@ -108,6 +108,23 @@ class Doctrine_Query_AggregateValue_TestCase extends Doctrine_UnitTestCase
$this->assertEqual($users[1]->count, 2);
}
public function testAggregateOrder()
{
$q = new Doctrine_Query();
$q->select('u.name, COUNT(u.id) count')->from('User u')->groupby('u.name')->orderby('count');
$users = $q->execute();
$this->assertEqual($users->count(), 2);
$this->assertEqual($users[0]->state(), Doctrine_Record::STATE_PROXY);
$this->assertEqual($users[1]->state(), Doctrine_Record::STATE_PROXY);
$this->assertEqual($users[0]->count, 2);
$this->assertEqual($users[1]->count, 2);
}
public function testAggregateValueMappingSupportsLeftJoins()
{
$q = new Doctrine_Query();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment