You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/Mouf/Database/MagicQueryTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -177,6 +177,9 @@ public function testStandardSelect()
177
177
178
178
$sql = 'SELECT a FROM users u, users u2';
179
179
$this->assertEquals('SELECT a FROM users AS u CROSS JOIN users AS u2', self::simplifySql($magicQuery->build($sql)));
180
+
181
+
$sql = 'SELECT a FROM users u WHERE status = (CASE WHEN u.id = 1 THEN u.status_1 ELSE u.status_2 END)';
182
+
$this->assertEquals('SELECT a FROM users AS u WHERE status = (CASE WHEN u.id = 1 THEN u.status_1 ELSE u.status_2 END)', self::simplifySql($magicQuery->build($sql)));
0 commit comments