Alter the escape like test, since it use raw SQL via query(), the sql statement would need to add ESCAPE clause for database(s) other than mysql
diff --git a/tests/codeigniter/database/query_builder/escape_test.php b/tests/codeigniter/database/query_builder/escape_test.php
index f2d1b84..5dd2da0 100644
--- a/tests/codeigniter/database/query_builder/escape_test.php
+++ b/tests/codeigniter/database/query_builder/escape_test.php
@@ -23,7 +23,9 @@
public function test_escape_like_percent_sign()
{
$string = $this->db->escape_like_str('\%foo');
- $sql = "SELECT `value` FROM `misc` WHERE `key` LIKE '$string%';";
+ $sql = "SELECT `value` FROM `misc` WHERE `key` LIKE '$string%'";
+ $sql .= (strpos(DB_DRIVER, 'mysql') !== FALSE) ? ";" : "ESCAPE '!';";
+
$res = $this->db->query($sql)->result_array();
// Check the result
@@ -38,7 +40,8 @@
public function test_escape_like_backslash_sign()
{
$string = $this->db->escape_like_str('\\');
- $sql = "SELECT `value` FROM `misc` WHERE `key` LIKE '$string%';";
+ $sql = "SELECT `value` FROM `misc` WHERE `key` LIKE '$string%'";
+ $sql .= (strpos(DB_DRIVER, 'mysql') !== FALSE) ? ";" : "ESCAPE '!';";
$res = $this->db->query($sql)->result_array();
// Check the result