From 7e2b58b8d7870032b4aae74c4190e817067d8be3 Mon Sep 17 00:00:00 2001 From: nate Date: Wed, 4 Jun 2008 19:27:55 +0000 Subject: [PATCH] Adding test case for DboSource::order(), disproves #3098 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7117 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/libs/model/datasources/dbo_source.test.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cake/tests/cases/libs/model/datasources/dbo_source.test.php b/cake/tests/cases/libs/model/datasources/dbo_source.test.php index 6122ca7d4..b4c844f0a 100644 --- a/cake/tests/cases/libs/model/datasources/dbo_source.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo_source.test.php @@ -3035,6 +3035,10 @@ class DboSourceTest extends CakeTestCase { $result = $this->testDb->order("Model.name+0 ASC"); $this->assertPattern("/^\s*ORDER BY\s+`Model`\.`name`\+0\s+ASC\s*$/", $result); + + $result = $this->testDb->order("Anuncio.destaque & 2 DESC"); + $expected = ' ORDER BY `Anuncio`.`destaque` & 2 DESC'; + $this->assertEqual($result, $expected); } function testCalculations() {