diff options
Diffstat (limited to 'tests/lib/Files/Node/FileTest.php')
-rw-r--r-- | tests/lib/Files/Node/FileTest.php | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/lib/Files/Node/FileTest.php b/tests/lib/Files/Node/FileTest.php index 6b5aaabbc28..c381fd9b2be 100644 --- a/tests/lib/Files/Node/FileTest.php +++ b/tests/lib/Files/Node/FileTest.php @@ -35,7 +35,7 @@ class FileTest extends NodeTest { public function testGetContent() { /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') - ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) + ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher]) ->getMock(); $hook = function ($file) { @@ -65,7 +65,7 @@ class FileTest extends NodeTest { /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') - ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) + ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher]) ->getMock(); $root->expects($this->any()) @@ -84,7 +84,7 @@ class FileTest extends NodeTest { public function testPutContent() { /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') - ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) + ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher]) ->getMock(); $root->expects($this->any()) @@ -111,7 +111,7 @@ class FileTest extends NodeTest { /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') - ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) + ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher]) ->getMock(); $this->view->expects($this->once()) @@ -126,7 +126,7 @@ class FileTest extends NodeTest { public function testGetMimeType() { /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */ $root = $this->getMockBuilder('\OC\Files\Node\Root') - ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) + ->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager, $this->eventDispatcher]) ->getMock(); $this->view->expects($this->once()) @@ -149,7 +149,8 @@ class FileTest extends NodeTest { $this->user, $this->userMountCache, $this->logger, - $this->userManager + $this->userManager, + $this->eventDispatcher ); $hook = function ($file) { @@ -184,7 +185,8 @@ class FileTest extends NodeTest { $this->user, $this->userMountCache, $this->logger, - $this->userManager + $this->userManager, + $this->eventDispatcher ); $hooksCalled = 0; $hook = function ($file) use (&$hooksCalled) { @@ -223,7 +225,8 @@ class FileTest extends NodeTest { $this->user, $this->userMountCache, $this->logger, - $this->userManager + $this->userManager, + $this->eventDispatcher ); $hook = function ($file) { throw new \Exception('Hooks are not supposed to be called'); @@ -248,7 +251,8 @@ class FileTest extends NodeTest { $this->user, $this->userMountCache, $this->logger, - $this->userManager + $this->userManager, + $this->eventDispatcher ); $hook = function () { throw new \Exception('Hooks are not supposed to be called'); @@ -273,7 +277,8 @@ class FileTest extends NodeTest { $this->user, $this->userMountCache, $this->logger, - $this->userManager + $this->userManager, + $this->eventDispatcher ); $hook = function () { throw new \Exception('Hooks are not supposed to be called'); |