Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix tests
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and artonge committed Dec 2, 2021
commit d89ce5a410da7adaecf7d185cda25b1877ebf4a6
7 changes: 3 additions & 4 deletions apps/files/lib/BackgroundJob/ScanFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use OCP\IConfig;
use OCP\IDBConnection;
use OCP\ILogger;
use OCP\IUserManager;

/**
* Class ScanFiles is a background job used to run the file scanner over the user
Expand All @@ -57,10 +56,10 @@ class ScanFiles extends \OC\BackgroundJob\TimedJob {
* @param IDBConnection $connection
*/
public function __construct(
IConfig $config,
IConfig $config,
IEventDispatcher $dispatcher,
ILogger $logger,
IDBConnection $connection
ILogger $logger,
IDBConnection $connection
) {
// Run once per 10 minutes
$this->setInterval(60 * 10);
Expand Down
3 changes: 0 additions & 3 deletions apps/files/tests/BackgroundJob/ScanFilesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
use OCP\IConfig;
use OCP\ILogger;
use OCP\IUser;
use OCP\IUserManager;
use Test\TestCase;
use Test\Traits\MountProviderTrait;
use Test\Traits\UserTrait;
Expand All @@ -55,7 +54,6 @@ protected function setUp(): void {
parent::setUp();

$config = $this->createMock(IConfig::class);
$userManager = $this->createMock(IUserManager::class);
$dispatcher = $this->createMock(IEventDispatcher::class);
$logger = $this->createMock(ILogger::class);
$connection = \OC::$server->getDatabaseConnection();
Expand All @@ -64,7 +62,6 @@ protected function setUp(): void {
$this->scanFiles = $this->getMockBuilder('\OCA\Files\BackgroundJob\ScanFiles')
->setConstructorArgs([
$config,
$userManager,
$dispatcher,
$logger,
$connection,
Expand Down
4 changes: 2 additions & 2 deletions apps/workflowengine/lib/Check/FileSystemTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ protected function getFileIds(ICache $cache, $path, $isExternalStorage) {
// TODO: Fix caching inside group folders
// Do not cache file ids inside group folders because multiple file ids might be mapped to
// the same combination of cache id + path.
$shouldCacheFileIds = !$this->storage
->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class);
/** @psalm-suppress InvalidArgument */
$shouldCacheFileIds = !$this->storage->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class);
$cacheId = $cache->getNumericStorageId();
if ($shouldCacheFileIds && isset($this->fileIds[$cacheId][$path])) {
return $this->fileIds[$cacheId][$path];
Expand Down
1 change: 0 additions & 1 deletion tests/lib/Files/Utils/ScannerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
use OC\Files\Filesystem;
use OC\Files\Mount\MountPoint;
use OC\Files\Storage\Temporary;
use OCA\Files_Sharing\SharedStorage;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IMountProvider;
use OCP\Files\Storage\IStorageFactory;
Expand Down