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(); + + + } +}