Skip to content

Commit

Permalink
fix(tests): Adapt tests to changes in RepairMimeTypes
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc authored and backportbot[bot] committed Sep 18, 2024
1 parent dd5e68c commit 83cbdbd
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions tests/lib/Repair/RepairMimeTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,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;

Expand Down Expand Up @@ -44,13 +47,21 @@ protected function setUp(): void {
$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 {
Expand Down

0 comments on commit 83cbdbd

Please sign in to comment.