aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Node
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Files/Node')
-rw-r--r--tests/lib/Files/Node/IntegrationTest.php2
-rw-r--r--tests/lib/Files/Node/NodeTest.php10
-rw-r--r--tests/lib/Files/Node/RootTest.php9
3 files changed, 4 insertions, 17 deletions
diff --git a/tests/lib/Files/Node/IntegrationTest.php b/tests/lib/Files/Node/IntegrationTest.php
index b5cd832d1dd..6d9b0ce20b9 100644
--- a/tests/lib/Files/Node/IntegrationTest.php
+++ b/tests/lib/Files/Node/IntegrationTest.php
@@ -45,7 +45,7 @@ class IntegrationTest extends \Test\TestCase {
\OC_Hook::clear('OC_Filesystem');
- $user = new User($this->getUniqueID('user'), new \Test\Util\User\Dummy);
+ $user = new User($this->getUniqueID('user'), new \Test\Util\User\Dummy, \OC::$server->getEventDispatcher());
$this->loginAsUser($user->getUID());
$this->view = new View();
diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php
index 9200ae69f75..dee5a0211c5 100644
--- a/tests/lib/Files/Node/NodeTest.php
+++ b/tests/lib/Files/Node/NodeTest.php
@@ -18,6 +18,7 @@ use OCP\Files\Storage;
use OCP\IConfig;
use OCP\ILogger;
use OCP\IURLGenerator;
+use OCP\IUser;
use OCP\IUserManager;
use OCP\Files\NotFoundException;
@@ -45,14 +46,7 @@ abstract class NodeTest extends \Test\TestCase {
protected function setUp() {
parent::setUp();
- $config = $this->getMockBuilder(IConfig::class)
- ->disableOriginalConstructor()
- ->getMock();
- $urlGenerator = $this->getMockBuilder(IURLGenerator
- ::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->user = new \OC\User\User('', new \Test\Util\User\Dummy, null, $config, $urlGenerator);
+ $this->user = $this->createMock(IUser::class);
$this->manager = $this->getMockBuilder(Manager::class)
->disableOriginalConstructor()
->getMock();
diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php
index fd050c8d90c..8a6e5411f26 100644
--- a/tests/lib/Files/Node/RootTest.php
+++ b/tests/lib/Files/Node/RootTest.php
@@ -39,14 +39,7 @@ class RootTest extends \Test\TestCase {
protected function setUp() {
parent::setUp();
- $config = $this->getMockBuilder(IConfig::class)
- ->disableOriginalConstructor()
- ->getMock();
- $urlgenerator = $this->getMockBuilder(IURLGenerator::class)
- ->disableOriginalConstructor()
- ->getMock();
-
- $this->user = new \OC\User\User('', new \Test\Util\User\Dummy, null, $config, $urlgenerator);
+ $this->user = $this->createMock(IUser::class);
$this->manager = $this->getMockBuilder(Manager::class)
->disableOriginalConstructor()
->getMock();