summaryrefslogtreecommitdiffstats
path: root/tests/lib/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/db.php')
-rw-r--r--tests/lib/db.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/lib/db.php b/tests/lib/db.php
index 1f62413cbe4..893d42cdbe9 100644
--- a/tests/lib/db.php
+++ b/tests/lib/db.php
@@ -263,4 +263,19 @@ class Test_DB extends PHPUnit_Framework_TestCase {
$query = OC_DB::prepare("UPDATE `*PREFIX*{$this->table2}` SET `uri` = ? WHERE `fullname` = ?");
return $query->execute(array($uri, $fullname));
}
+
+ public function testILIKE() {
+ $table = "*PREFIX*{$this->table2}";
+
+ $query = OC_DB::prepare("INSERT INTO `$table` (`fullname`, `uri`, `carddata`) VALUES (?, ?, ?)");
+ $query->execute(array('fooBAR', 'foo', 'bar'));
+
+ $query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` LIKE ?");
+ $result = $query->execute(array('foobar'));
+ $this->assertCount(0, $result->fetchAll());
+
+ $query = OC_DB::prepare("SELECT * FROM `$table` WHERE `fullname` ILIKE ?");
+ $result = $query->execute(array('foobar'));
+ $this->assertCount(1, $result->fetchAll());
+ }
}