only disable unicode test on mysql

This commit is contained in:
Morris Jobke 2015-07-30 14:57:17 +02:00
parent cc28f82b36
commit 296a3274cf
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
1 changed files with 11 additions and 7 deletions

View File

@ -400,7 +400,7 @@ class LegacyDBTest extends \Test\TestCase {
/** /**
* @dataProvider insertAndSelectDataProvider * @dataProvider insertAndSelectDataProvider
*/ */
public function testInsertAndSelectData($expected) { public function testInsertAndSelectData($expected, $skipOnMysql) {
$table = "*PREFIX*{$this->text_table}"; $table = "*PREFIX*{$this->text_table}";
$query = OC_DB::prepare("INSERT INTO `$table` (`textfield`) VALUES (?)"); $query = OC_DB::prepare("INSERT INTO `$table` (`textfield`) VALUES (?)");
@ -408,17 +408,21 @@ class LegacyDBTest extends \Test\TestCase {
$this->assertEquals(1, $result); $this->assertEquals(1, $result);
$actual = OC_DB::prepare("SELECT `textfield` FROM `$table`")->execute()->fetchOne(); $actual = OC_DB::prepare("SELECT `textfield` FROM `$table`")->execute()->fetchOne();
$config = \OC::$server->getConfig();
if($skipOnMysql && $config->getSystemValue('dbtype', 'sqlite') === 'mysql' && $config->getSystemValue('mysql.utf8mb4', false) === false) {
return;
}
$this->assertSame($expected, $actual); $this->assertSame($expected, $actual);
} }
public function insertAndSelectDataProvider() { public function insertAndSelectDataProvider() {
return [ return [
['abcdefghijklmnopqrstuvwxyzABCDEFGHIKLMNOPQRSTUVWXYZ'], ['abcdefghijklmnopqrstuvwxyzABCDEFGHIKLMNOPQRSTUVWXYZ', false],
['0123456789'], ['0123456789', false],
['äöüÄÖÜß!"§$%&/()=?#\'+*~°^`´'], ['äöüÄÖÜß!"§$%&/()=?#\'+*~°^`´', false],
['²³¼½¬{[]}\\'], ['²³¼½¬{[]}\\', false],
['♡⚗'], ['♡⚗', false],
['💩'], # :hankey: on github ['💩', true], # :hankey: on github
]; ];
} }
} }