Skip to content

Commit d89ce5a

Browse files
icewind1991artonge
authored andcommitted
fix tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent f70f9cf commit d89ce5a

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

apps/files/lib/BackgroundJob/ScanFiles.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
use OCP\IConfig;
3131
use OCP\IDBConnection;
3232
use OCP\ILogger;
33-
use OCP\IUserManager;
3433

3534
/**
3635
* Class ScanFiles is a background job used to run the file scanner over the user
@@ -57,10 +56,10 @@ class ScanFiles extends \OC\BackgroundJob\TimedJob {
5756
* @param IDBConnection $connection
5857
*/
5958
public function __construct(
60-
IConfig $config,
59+
IConfig $config,
6160
IEventDispatcher $dispatcher,
62-
ILogger $logger,
63-
IDBConnection $connection
61+
ILogger $logger,
62+
IDBConnection $connection
6463
) {
6564
// Run once per 10 minutes
6665
$this->setInterval(60 * 10);

apps/files/tests/BackgroundJob/ScanFilesTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
use OCP\IConfig;
3232
use OCP\ILogger;
3333
use OCP\IUser;
34-
use OCP\IUserManager;
3534
use Test\TestCase;
3635
use Test\Traits\MountProviderTrait;
3736
use Test\Traits\UserTrait;
@@ -55,7 +54,6 @@ protected function setUp(): void {
5554
parent::setUp();
5655

5756
$config = $this->createMock(IConfig::class);
58-
$userManager = $this->createMock(IUserManager::class);
5957
$dispatcher = $this->createMock(IEventDispatcher::class);
6058
$logger = $this->createMock(ILogger::class);
6159
$connection = \OC::$server->getDatabaseConnection();
@@ -64,7 +62,6 @@ protected function setUp(): void {
6462
$this->scanFiles = $this->getMockBuilder('\OCA\Files\BackgroundJob\ScanFiles')
6563
->setConstructorArgs([
6664
$config,
67-
$userManager,
6865
$dispatcher,
6966
$logger,
7067
$connection,

apps/workflowengine/lib/Check/FileSystemTags.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ protected function getFileIds(ICache $cache, $path, $isExternalStorage) {
130130
// TODO: Fix caching inside group folders
131131
// Do not cache file ids inside group folders because multiple file ids might be mapped to
132132
// the same combination of cache id + path.
133-
$shouldCacheFileIds = !$this->storage
134-
->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class);
133+
/** @psalm-suppress InvalidArgument */
134+
$shouldCacheFileIds = !$this->storage->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class);
135135
$cacheId = $cache->getNumericStorageId();
136136
if ($shouldCacheFileIds && isset($this->fileIds[$cacheId][$path])) {
137137
return $this->fileIds[$cacheId][$path];

tests/lib/Files/Utils/ScannerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use OC\Files\Filesystem;
1212
use OC\Files\Mount\MountPoint;
1313
use OC\Files\Storage\Temporary;
14-
use OCA\Files_Sharing\SharedStorage;
1514
use OCP\EventDispatcher\IEventDispatcher;
1615
use OCP\Files\Config\IMountProvider;
1716
use OCP\Files\Storage\IStorageFactory;

0 commit comments

Comments
 (0)