aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Node/IntegrationTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Node/IntegrationTest.php')
-rw-r--r--tests/lib/Files/Node/IntegrationTest.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/tests/lib/Files/Node/IntegrationTest.php b/tests/lib/Files/Node/IntegrationTest.php
index 7d87cdb5dd0..f059afa1625 100644
--- a/tests/lib/Files/Node/IntegrationTest.php
+++ b/tests/lib/Files/Node/IntegrationTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@@ -8,13 +9,16 @@
namespace Test\Files\Node;
use OC\Files\Node\Root;
+use OC\Files\Storage\Storage;
use OC\Files\Storage\Temporary;
use OC\Files\View;
use OC\Memcache\ArrayCache;
use OCP\EventDispatcher\IEventDispatcher;
+use OCP\Files\Config\IUserMountCache;
use OCP\Files\Mount\IMountManager;
use OCP\ICacheFactory;
use OCP\IUserManager;
+use OCP\Server;
use Psr\Log\LoggerInterface;
use Test\Traits\UserTrait;
@@ -34,20 +38,19 @@ class IntegrationTest extends \Test\TestCase {
private $root;
/**
- * @var \OC\Files\Storage\Storage[]
+ * @var Storage[]
*/
private $storages;
/**
- * @var \OC\Files\View $view
+ * @var View $view
*/
private $view;
protected function setUp(): void {
parent::setUp();
- /** @var IMountManager $manager */
- $manager = \OC::$server->get(IMountManager::class);
+ $manager = Server::get(IMountManager::class);
\OC_Hook::clear('OC_Filesystem');
@@ -64,7 +67,7 @@ class IntegrationTest extends \Test\TestCase {
$manager,
$this->view,
$user,
- \OC::$server->getUserMountCache(),
+ Server::get(IUserMountCache::class),
$this->createMock(LoggerInterface::class),
$this->createMock(IUserManager::class),
$this->createMock(IEventDispatcher::class),
@@ -88,7 +91,7 @@ class IntegrationTest extends \Test\TestCase {
parent::tearDown();
}
- public function testBasicFile() {
+ public function testBasicFile(): void {
$file = $this->root->newFile('/foo.txt');
$this->assertCount(2, $this->root->getDirectoryListing());
$this->assertTrue($this->root->nodeExists('/foo.txt'));
@@ -111,7 +114,7 @@ class IntegrationTest extends \Test\TestCase {
$this->assertEquals('qwerty', $file->getContent());
}
- public function testBasicFolder() {
+ public function testBasicFolder(): void {
$folder = $this->root->newFolder('/foo');
$this->assertTrue($this->root->nodeExists('/foo'));
$file = $folder->newFile('/bar');