summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-10-18 11:17:13 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-10-19 00:15:01 +0200
commit17a2723948830e30713d012f0739c336af2a12f1 (patch)
tree31b0cedab739915e15a9e7014187998c436b222d
parent15bbe0210670d5b23b265628209b9b3de50d0fd6 (diff)
downloadnextcloud-server-17a2723948830e30713d012f0739c336af2a12f1.tar.gz
nextcloud-server-17a2723948830e30713d012f0739c336af2a12f1.zip
Fix the test
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--tests/lib/DB/LegacyDBTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/DB/LegacyDBTest.php b/tests/lib/DB/LegacyDBTest.php
index d28dfd14481..f3de570c52d 100644
--- a/tests/lib/DB/LegacyDBTest.php
+++ b/tests/lib/DB/LegacyDBTest.php
@@ -400,18 +400,18 @@ class LegacyDBTest extends \Test\TestCase {
/**
* @dataProvider insertAndSelectDataProvider
*/
- public function testInsertAndSelectData($expected, $skipOnMysql) {
+ public function testInsertAndSelectData($expected, $throwsOnMysqlWithoutUTF8MB4) {
$table = "*PREFIX*{$this->text_table}";
+ $config = \OC::$server->getConfig();
$query = OC_DB::prepare("INSERT INTO `$table` (`textfield`) VALUES (?)");
+ if ($throwsOnMysqlWithoutUTF8MB4 && $config->getSystemValue('dbtype', 'sqlite') === 'mysql' && $config->getSystemValue('mysql.utf8mb4', false) === false) {
+ $this->markTestSkipped('MySQL requires UTF8mb4 to store value: ' . $expected);
+ }
$result = $query->execute(array($expected));
$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);
}