aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Repair
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Repair')
-rw-r--r--tests/lib/Repair/RepairMimeTypesTest.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/lib/Repair/RepairMimeTypesTest.php b/tests/lib/Repair/RepairMimeTypesTest.php
index 0f1a945bd8d..45a555e0b91 100644
--- a/tests/lib/Repair/RepairMimeTypesTest.php
+++ b/tests/lib/Repair/RepairMimeTypesTest.php
@@ -8,8 +8,11 @@
namespace Test\Repair;
use OC\Files\Storage\Temporary;
+use OC\Repair\RepairMimeTypes;
use OCP\Files\IMimeTypeLoader;
+use OCP\IAppConfig;
use OCP\IConfig;
+use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
@@ -42,13 +45,21 @@ class RepairMimeTypesTest extends \Test\TestCase {
$config->method('getSystemValueString')
->with('version')
->willReturn('11.0.0.0');
- $config->method('getAppValue')
+
+ $appConfig = $this->getMockBuilder(IAppConfig::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+ $appConfig->method('getValueString')
->with('files', 'mimetype_version')
->willReturn('11.0.0.0');
- $this->storage = new \OC\Files\Storage\Temporary([]);
+ $this->storage = new Temporary([]);
- $this->repair = new \OC\Repair\RepairMimeTypes($config, \OC::$server->getDatabaseConnection());
+ $this->repair = new RepairMimeTypes(
+ $config,
+ $appConfig,
+ \OCP\Server::get(IDBConnection::class),
+ );
}
protected function tearDown(): void {