Skip to content

Commit 13ea90c

Browse files
committed
Bracket Expression: wrong position (Test Case)
1 parent 10c68ca commit 13ea90c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/Mouf/Database/MagicQueryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,9 @@ public function testStandardSelect()
193193

194194
$sql = 'SELECT 42 as fooalias FROM bar HAVING fooalias = 24';
195195
$this->assertEquals('SELECT 42 AS fooalias FROM bar HAVING fooalias = 24', self::simplifySql($magicQuery->build($sql)));
196+
197+
$sql = 'SELECT bar.foo FROM bar ORDER BY (bar.foo IS NULL) DESC, (bar.baz = 0) DESC, bar.id DESC';
198+
$this->assertEquals($sql, self::simplifySql($magicQuery->build($sql)));
196199
}
197200

198201
/**

0 commit comments

Comments
 (0)