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
@@ -85,6 +85,9 @@ public function testStandardSelect()
85
85
$sql = 'SELECT * FROM users WHERE status not in (:status)';
86
86
$this->assertEquals("SELECT * FROM users WHERE status NOT IN ('2','4')", self::simplifySql($magicQuery->build($sql, ['status' => [2, 4]])));
87
87
88
+
$sql = 'SELECT * FROM users WHERE email not like :email';
89
+
$this->assertEquals("SELECT * FROM users WHERE email NOT LIKE '%@example.com'", self::simplifySql($magicQuery->build($sql, ['email' => '%@example.com'])));
90
+
88
91
$sql = 'SELECT * FROM myTable where someField BETWEEN :value1 AND :value2';
89
92
$this->assertEquals("SELECT * FROM myTable WHERE someField BETWEEN '2' AND '4'", self::simplifySql($magicQuery->build($sql, ['value1' => 2, 'value2' => 4])));
90
93
$this->assertEquals("SELECT * FROM myTable WHERE someField >= '2'", self::simplifySql($magicQuery->build($sql, ['value1' => 2])));
0 commit comments