summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/lib/db.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/db.php b/tests/lib/db.php
index 1977025cf12..96be3ea909e 100644
--- a/tests/lib/db.php
+++ b/tests/lib/db.php
@@ -145,4 +145,17 @@ class Test_DB extends PHPUnit_Framework_TestCase {
$this->assertEquals(1, $result->numRows());
}
+
+ public function testUtf8Data() {
+ $table = "*PREFIX*{$this->table2}";
+ $conn = OC_DB::getConnection();
+ $data = array(
+ 'uri' => 'uri_1',
+ 'fullname' => "ะ‹รถ้›™ๅ–œ\xE2\x80\xA2",
+ 'carddata' => 'This is a vCard',
+ );
+ $conn->insert($table, $data);
+ $row = $conn->fetchAssoc("SELECT * FROM $table");
+ $this->assertSame($data['fullname'], $row['fullname']);
+ }
}