summaryrefslogtreecommitdiffstats
path: root/tests/lib/share20
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-11 11:21:12 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-11 11:21:12 +0100
commit2aa206e9005f400635c8f32b76bedc2d68848db6 (patch)
treeffb4c0d39c3b9f5f3b13a6618a016ab8175cd760 /tests/lib/share20
parentee080a9bc319aa4ef1cfe264068a4ae932bf7747 (diff)
downloadnextcloud-server-2aa206e9005f400635c8f32b76bedc2d68848db6.tar.gz
nextcloud-server-2aa206e9005f400635c8f32b76bedc2d68848db6.zip
Fix unit tests
Diffstat (limited to 'tests/lib/share20')
-rw-r--r--tests/lib/share20/managertest.php14
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/lib/share20/managertest.php b/tests/lib/share20/managertest.php
index 73a1b0a6530..b619d4cb302 100644
--- a/tests/lib/share20/managertest.php
+++ b/tests/lib/share20/managertest.php
@@ -132,16 +132,10 @@ class ManagerTest extends \Test\TestCase {
}
/**
- * @expectedException \OCP\Share\Exceptions\ShareNotFound
+ * @expectedException \InvalidArgumentException
*/
public function testDeleteNoShareId() {
- $share = $this->getMock('\OCP\Share\IShare');
-
- $share
- ->expects($this->once())
- ->method('getFullId')
- ->with()
- ->willReturn(null);
+ $share = $this->manager->newShare();
$this->manager->deleteShare($share);
}
@@ -181,7 +175,6 @@ class ManagerTest extends \Test\TestCase {
->setNode($path)
->setTarget('myTarget');
- $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share);
$manager->expects($this->once())->method('deleteChildren')->with($share);
$this->defaultProvider
@@ -261,7 +254,6 @@ class ManagerTest extends \Test\TestCase {
$this->rootFolder->expects($this->never())->method($this->anything());
- $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share);
$manager->expects($this->once())->method('deleteChildren')->with($share);
$this->defaultProvider
@@ -359,8 +351,6 @@ class ManagerTest extends \Test\TestCase {
->setTarget('myTarget3')
->setParent(43);
- $manager->expects($this->once())->method('getShareById')->with('prov:42')->willReturn($share1);
-
$this->defaultProvider
->method('getChildren')
->will($this->returnValueMap([