diff --git a/tests/lib/Repair/RepairCollationTest.php b/tests/lib/Repair/RepairCollationTest.php index 2e304a74ab..897f772a79 100644 --- a/tests/lib/Repair/RepairCollationTest.php +++ b/tests/lib/Repair/RepairCollationTest.php @@ -1,9 +1,4 @@ * 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() {