diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-12 11:11:26 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-12 11:11:26 +0100 |
commit | 207c09c5113118d053c34360d34d27e754b34bb8 (patch) | |
tree | fc71b7c396afd0e64b8b794a9bcc9e07f671d94f /tests | |
parent | e99c4d83dc3ec93f35ff6d2ddf9521444156ee50 (diff) | |
parent | 2aa206e9005f400635c8f32b76bedc2d68848db6 (diff) | |
download | nextcloud-server-207c09c5113118d053c34360d34d27e754b34bb8.tar.gz nextcloud-server-207c09c5113118d053c34360d34d27e754b34bb8.zip |
Merge pull request #22309 from owncloud/infinite-recursion-on-expired-link
Do not getShare in deleteShare, it's already there when deleting
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/share20/managertest.php | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/lib/share20/managertest.php b/tests/lib/share20/managertest.php index 1230c191b6b..bb91ed0d51e 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([ |