diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-17 19:34:44 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-09-17 19:34:44 +0200 |
commit | b124f197779a0a550730b928361f8e5b7e2f6028 (patch) | |
tree | 31ba0027cee4db953a77a4e3d4d72c0ec2ab42d3 /tests | |
parent | cfca7e7911568a7fd12c4c2116d77c126cff51ad (diff) | |
download | nextcloud-server-b124f197779a0a550730b928361f8e5b7e2f6028.tar.gz nextcloud-server-b124f197779a0a550730b928361f8e5b7e2f6028.zip |
fix(tests): Adapt tests to changes in RepairMimeTypes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Repair/RepairMimeTypesTest.php | 17 |
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 { |