From 24d694bf3eb80c678bd98d6196ad50b646d43d3d Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 7 Feb 2007 13:51:09 +0000 Subject: [PATCH] --- tests/Query/OrderbyTestCase.php | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tests/Query/OrderbyTestCase.php diff --git a/tests/Query/OrderbyTestCase.php b/tests/Query/OrderbyTestCase.php new file mode 100644 index 000000000..5e431739c --- /dev/null +++ b/tests/Query/OrderbyTestCase.php @@ -0,0 +1,47 @@ +. + */ + +/** + * Doctrine_Query_Orderby_TestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_Query_Orderby_TestCase extends Doctrine_UnitTestCase +{ + public function testOrderByAggregateValueIsSupported() + { + $q = new Doctrine_Query(); + + $q->select('u.name, COUNT(p.phonenumber) count') + ->from('User u')->leftJoin('u.Phonenumber p') + ->orderby('count DESC'); + + $users = $q->execute(); + + + } +}