Permalink
Browse files

MINOR Fixing broken SQLQueryTest cases

  • Loading branch information...
halkyon committed May 3, 2012
1 parent 37369ab commit 450bc258d86449167ff328809e920589bf820569
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/model/SQLQueryTest.php
@@ -132,18 +132,18 @@ function testSelectWithOrderbyClause() {
$query = new SQLQuery();
$query->from[] = "MyTable";
$query->orderby('implode("MyName","Color")');
- $this->assertEquals('SELECT *, implode("MyName","Color") AS "_SortColumn0" FROM MyTable ORDER BY _SortColumn0 ASC', $query->sql());
+ $this->assertEquals('SELECT *, implode("MyName","Color") AS "_SortColumn0" FROM MyTable ORDER BY "_SortColumn0" ASC', $query->sql());
$query = new SQLQuery();
$query->from[] = "MyTable";
$query->orderby('implode("MyName","Color") DESC');
- $this->assertEquals('SELECT *, implode("MyName","Color") AS "_SortColumn0" FROM MyTable ORDER BY _SortColumn0 DESC', $query->sql());
+ $this->assertEquals('SELECT *, implode("MyName","Color") AS "_SortColumn0" FROM MyTable ORDER BY "_SortColumn0" DESC', $query->sql());
$query = new SQLQuery();
$query->from[] = "MyTable";
$query->orderby('RAND()');
- $this->assertEquals('SELECT *, RAND() AS "_SortColumn0" FROM MyTable ORDER BY _SortColumn0 ASC', $query->sql());
+ $this->assertEquals('SELECT *, RAND() AS "_SortColumn0" FROM MyTable ORDER BY "_SortColumn0" ASC', $query->sql());
}
public function testReverseOrderBy() {
@@ -174,7 +174,7 @@ public function testReverseOrderBy() {
$query->orderby('implode("MyName","Color") DESC');
$query->reverseOrderBy();
- $this->assertEquals('SELECT *, implode("MyName","Color") AS "_SortColumn0" FROM MyTable ORDER BY _SortColumn0 ASC',$query->sql());
+ $this->assertEquals('SELECT *, implode("MyName","Color") AS "_SortColumn0" FROM MyTable ORDER BY "_SortColumn0" ASC',$query->sql());
}
function testFiltersOnID() {

0 comments on commit 450bc25

Please sign in to comment.