summaryrefslogtreecommitdiffstats
path: root/tests/lib/Repair
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-10-18 16:09:48 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-10-19 00:15:01 +0200
commit43b7b143f46fd59911ef463d60d158dcc925d4af (patch)
treece8e7eb952836449f694004034799cf04f65a007 /tests/lib/Repair
parentb1235a67de9589457af91dfc322d7853199547b0 (diff)
downloadnextcloud-server-43b7b143f46fd59911ef463d60d158dcc925d4af.tar.gz
nextcloud-server-43b7b143f46fd59911ef463d60d158dcc925d4af.zip
Fix test of repair step
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Repair')
-rw-r--r--tests/lib/Repair/RepairCollationTest.php16
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/lib/Repair/RepairCollationTest.php b/tests/lib/Repair/RepairCollationTest.php
index 2e304a74abc..897f772a794 100644
--- a/tests/lib/Repair/RepairCollationTest.php
+++ b/tests/lib/Repair/RepairCollationTest.php
@@ -1,9 +1,4 @@
<?php
-
-namespace Test\Repair;
-
-use OCP\Migration\IOutput;
-
/**
* Copyright (c) 2014 Thomas Müller <deepdiver@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
@@ -11,6 +6,11 @@ use OCP\Migration\IOutput;
* See the COPYING-README file.
*/
+namespace Test\Repair;
+
+use OCP\ILogger;
+use OCP\Migration\IOutput;
+
class TestCollationRepair extends \OC\Repair\Collation {
/**
* @param \Doctrine\DBAL\Connection $connection
@@ -50,10 +50,14 @@ class RepairCollationTest extends \Test\TestCase {
*/
private $config;
+ /** @var ILogger */
+ private $logger;
+
protected function setUp() {
parent::setUp();
$this->connection = \OC::$server->getDatabaseConnection();
+ $this->logger = $this->createMock(ILogger::class);
$this->config = \OC::$server->getConfig();
if (!$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\MySqlPlatform) {
$this->markTestSkipped("Test only relevant on MySql");
@@ -63,7 +67,7 @@ class RepairCollationTest extends \Test\TestCase {
$this->tableName = $this->getUniqueID($dbPrefix . "_collation_test");
$this->connection->exec("CREATE TABLE $this->tableName(text VARCHAR(16)) COLLATE utf8_unicode_ci");
- $this->repair = new TestCollationRepair($this->config, $this->connection);
+ $this->repair = new TestCollationRepair($this->config, $this->logger, $this->connection, false);
}
protected function tearDown() {