|
16 | 16 | use OCP\AppFramework\OCS\OCSForbiddenException; |
17 | 17 | use OCP\AppFramework\OCS\OCSNotFoundException; |
18 | 18 | use OCP\Constants; |
| 19 | +use OCP\Files\Cache\ICache; |
19 | 20 | use OCP\Files\File; |
20 | 21 | use OCP\Files\Folder; |
21 | 22 | use OCP\Files\IRootFolder; |
@@ -5244,7 +5245,7 @@ public function testPopulateTags(): void { |
5244 | 5245 | ], $result); |
5245 | 5246 | } |
5246 | 5247 |
|
5247 | | - public function trustedServerProvider(): array { |
| 5248 | + public static function trustedServerProvider(): array { |
5248 | 5249 | return [ |
5249 | 5250 | 'Trusted server' => [true, true], |
5250 | 5251 | 'Untrusted server' => [false, false], |
@@ -5272,21 +5273,21 @@ public function testFormatShareWithFederatedShare(bool $isKnownServer, bool $isT |
5272 | 5273 | $nodeId |
5273 | 5274 | ); |
5274 | 5275 |
|
5275 | | - $node = $this->createMock(\OCP\Files\File::class); |
| 5276 | + $node = $this->createMock(File::class); |
5276 | 5277 | $node->method('getId')->willReturn($nodeId); |
5277 | 5278 | $node->method('getPath')->willReturn($nodePath); |
5278 | 5279 | $node->method('getInternalPath')->willReturn(ltrim($nodePath, '/')); |
5279 | | - $mountPoint = $this->createMock(\OCP\Files\Mount\IMountPoint::class); |
| 5280 | + $mountPoint = $this->createMock(IMountPoint::class); |
5280 | 5281 | $mountPoint->method('getMountType')->willReturn('local'); |
5281 | 5282 | $node->method('getMountPoint')->willReturn($mountPoint); |
5282 | 5283 | $node->method('getMimetype')->willReturn('text/plain'); |
5283 | | - $storage = $this->createMock(\OCP\Files\Storage\IStorage::class); |
5284 | | - $storageCache = $this->createMock(\OCP\Files\Cache\ICache::class); |
| 5284 | + $storage = $this->createMock(IStorage::class); |
| 5285 | + $storageCache = $this->createMock(ICache::class); |
5285 | 5286 | $storageCache->method('getNumericStorageId')->willReturn(1); |
5286 | 5287 | $storage->method('getCache')->willReturn($storageCache); |
5287 | 5288 | $storage->method('getId')->willReturn('home::shareOwner'); |
5288 | 5289 | $node->method('getStorage')->willReturn($storage); |
5289 | | - $parent = $this->createMock(\OCP\Files\Folder::class); |
| 5290 | + $parent = $this->createMock(Folder::class); |
5290 | 5291 | $parent->method('getId')->willReturn(2); |
5291 | 5292 | $node->method('getParent')->willReturn($parent); |
5292 | 5293 | $node->method('getSize')->willReturn(1234); |
@@ -5334,21 +5335,21 @@ public function testFormatShareWithFederatedShareWithAtInUsername(): void { |
5334 | 5335 | $nodeId |
5335 | 5336 | ); |
5336 | 5337 |
|
5337 | | - $node = $this->createMock(\OCP\Files\File::class); |
| 5338 | + $node = $this->createMock(File::class); |
5338 | 5339 | $node->method('getId')->willReturn($nodeId); |
5339 | 5340 | $node->method('getPath')->willReturn($nodePath); |
5340 | 5341 | $node->method('getInternalPath')->willReturn(ltrim($nodePath, '/')); |
5341 | | - $mountPoint = $this->createMock(\OCP\Files\Mount\IMountPoint::class); |
| 5342 | + $mountPoint = $this->createMock(IMountPoint::class); |
5342 | 5343 | $mountPoint->method('getMountType')->willReturn('local'); |
5343 | 5344 | $node->method('getMountPoint')->willReturn($mountPoint); |
5344 | 5345 | $node->method('getMimetype')->willReturn('text/plain'); |
5345 | | - $storage = $this->createMock(\OCP\Files\Storage\IStorage::class); |
5346 | | - $storageCache = $this->createMock(\OCP\Files\Cache\ICache::class); |
| 5346 | + $storage = $this->createMock(IStorage::class); |
| 5347 | + $storageCache = $this->createMock(ICache::class); |
5347 | 5348 | $storageCache->method('getNumericStorageId')->willReturn(1); |
5348 | 5349 | $storage->method('getCache')->willReturn($storageCache); |
5349 | 5350 | $storage->method('getId')->willReturn('home::shareOwner'); |
5350 | 5351 | $node->method('getStorage')->willReturn($storage); |
5351 | | - $parent = $this->createMock(\OCP\Files\Folder::class); |
| 5352 | + $parent = $this->createMock(Folder::class); |
5352 | 5353 | $parent->method('getId')->willReturn(2); |
5353 | 5354 | $node->method('getParent')->willReturn($parent); |
5354 | 5355 | $node->method('getSize')->willReturn(1234); |
|
0 commit comments