diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-07-30 14:57:17 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-10-19 00:15:01 +0200 |
commit | 296a3274cf9fccc5fea1f067bb5cb9cc71450734 (patch) | |
tree | 3ada6252969e173ba38cf3db10c93462d63e31df /tests | |
parent | cc28f82b369c2e8ebf2d0b4390379b9cda4af40b (diff) | |
download | nextcloud-server-296a3274cf9fccc5fea1f067bb5cb9cc71450734.tar.gz nextcloud-server-296a3274cf9fccc5fea1f067bb5cb9cc71450734.zip |
only disable unicode test on mysql
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/DB/LegacyDBTest.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php index 2c91121c024..d28dfd14481 100644 --- a/tests/lib/DB/LegacyDBTest.php +++ b/tests/lib/DB/LegacyDBTest.php @@ -400,7 +400,7 @@ class LegacyDBTest extends \Test\TestCase { /** * @dataProvider insertAndSelectDataProvider */ - public function testInsertAndSelectData($expected) { + public function testInsertAndSelectData($expected, $skipOnMysql) { $table = "*PREFIX*{$this->text_table}"; $query = OC_DB::prepare("INSERT INTO `$table` (`textfield`) VALUES (?)"); @@ -408,17 +408,21 @@ class LegacyDBTest extends \Test\TestCase { $this->assertEquals(1, $result); $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); } public function insertAndSelectDataProvider() { return [ - ['abcdefghijklmnopqrstuvwxyzABCDEFGHIKLMNOPQRSTUVWXYZ'], - ['0123456789'], - ['äöüÄÖÜß!"§$%&/()=?#\'+*~°^`´'], - ['²³¼½¬{[]}\\'], - ['♡⚗'], - ['💩'], # :hankey: on github + ['abcdefghijklmnopqrstuvwxyzABCDEFGHIKLMNOPQRSTUVWXYZ', false], + ['0123456789', false], + ['äöüÄÖÜß!"§$%&/()=?#\'+*~°^`´', false], + ['²³¼½¬{[]}\\', false], + ['♡⚗', false], + ['💩', true], # :hankey: on github ]; } } |