Skip to content

Commit 1cccb2a

Browse files
committed
Bracket Expression: Add test for () AS
1 parent 6f97e2c commit 1cccb2a

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
@@ -196,6 +196,9 @@ public function testStandardSelect()
196196

197197
$sql = 'SELECT bar.foo FROM bar ORDER BY (bar.foo IS NULL) DESC, (bar.baz = 0) DESC, bar.id DESC';
198198
$this->assertEquals($sql, self::simplifySql($magicQuery->build($sql)));
199+
200+
$sql = 'SELECT (id + 2) AS foo FROM bar';
201+
$this->assertEquals($sql, self::simplifySql($magicQuery->build($sql)));
199202
}
200203

201204
/**

0 commit comments

Comments
 (0)