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 committed Sep 17, 2024
1 parent cfca7e7 commit b124f19
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 @@ -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;

Expand Down Expand Up @@ -42,13 +45,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 b124f19

Please sign in to comment.