summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/DirectEditing/ManagerTest.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/lib/DirectEditing/ManagerTest.php b/tests/lib/DirectEditing/ManagerTest.php
index 1f18a25115f..737a41425e1 100644
--- a/tests/lib/DirectEditing/ManagerTest.php
+++ b/tests/lib/DirectEditing/ManagerTest.php
@@ -153,9 +153,9 @@ class ManagerTest extends TestCase {
->method('generate')
->willReturn($expectedToken);
$this->userFolder
- ->method('get')
+ ->method('nodeExists')
->with('/File.txt')
- ->willThrowException(new NotFoundException());
+ ->willReturn(false);
$this->userFolder->expects($this->once())
->method('newFile')
->willReturn($file);
@@ -173,9 +173,9 @@ class ManagerTest extends TestCase {
->method('generate')
->willReturn($expectedToken);
$this->userFolder
- ->method('get')
+ ->method('nodeExists')
->with('/File.txt')
- ->willThrowException(new NotFoundException());
+ ->willReturn(false);
$this->userFolder->expects($this->once())
->method('newFile')
->willReturn($file);
@@ -188,6 +188,10 @@ class ManagerTest extends TestCase {
public function testCreateFileAlreadyExists() {
$this->expectException(\RuntimeException::class);
+ $this->userFolder
+ ->method('nodeExists')
+ ->with('/File.txt')
+ ->willReturn(true);
$this->manager->create('/File.txt', 'testeditor', 'createEmpty');
}