|
|
|
|
@ -196,7 +196,7 @@ class ShareAPIControllerTest extends TestCase { |
|
|
|
|
|
|
|
|
|
public function testDeleteShareShareNotFound() { |
|
|
|
|
$this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); |
|
|
|
|
$this->expectExceptionMessage('Wrong share ID, share doesn\'t exist'); |
|
|
|
|
$this->expectExceptionMessage('Wrong share ID, share does not exist'); |
|
|
|
|
|
|
|
|
|
$this->shareManager |
|
|
|
|
->expects($this->exactly(6)) |
|
|
|
|
@ -433,7 +433,7 @@ class ShareAPIControllerTest extends TestCase { |
|
|
|
|
*/ |
|
|
|
|
public function testDeleteSharedWithGroupIDontBelongTo() { |
|
|
|
|
$this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); |
|
|
|
|
$this->expectExceptionMessage('Wrong share ID, share doesn\'t exist'); |
|
|
|
|
$this->expectExceptionMessage('Wrong share ID, share does not exist'); |
|
|
|
|
|
|
|
|
|
$node = $this->getMockBuilder(File::class)->getMock(); |
|
|
|
|
|
|
|
|
|
@ -498,7 +498,7 @@ class ShareAPIControllerTest extends TestCase { |
|
|
|
|
->with('ocinternal:42', 'currentUser') |
|
|
|
|
->will($this->throwException(new \OC\Share20\Exception\ShareNotFound())); |
|
|
|
|
|
|
|
|
|
$expected = new \OC\OCS\Result(null, 404, 'wrong share ID, share doesn\'t exist.'); |
|
|
|
|
$expected = new \OC\OCS\Result(null, 404, 'wrong share ID, share does not exist.'); |
|
|
|
|
$this->assertEquals($expected, $this->ocs->getShare(42)); |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
@ -808,7 +808,7 @@ class ShareAPIControllerTest extends TestCase { |
|
|
|
|
|
|
|
|
|
public function testGetShareInvalidNode() { |
|
|
|
|
$this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); |
|
|
|
|
$this->expectExceptionMessage('Wrong share ID, share doesn\'t exist'); |
|
|
|
|
$this->expectExceptionMessage('Wrong share ID, share does not exist'); |
|
|
|
|
|
|
|
|
|
$share = \OC::$server->getShareManager()->newShare(); |
|
|
|
|
$share->setSharedBy('initiator') |
|
|
|
|
@ -2602,7 +2602,7 @@ class ShareAPIControllerTest extends TestCase { |
|
|
|
|
|
|
|
|
|
public function testUpdateShareCantAccess() { |
|
|
|
|
$this->expectException(\OCP\AppFramework\OCS\OCSNotFoundException::class); |
|
|
|
|
$this->expectExceptionMessage('Wrong share ID, share doesn\'t exist'); |
|
|
|
|
$this->expectExceptionMessage('Wrong share ID, share does not exist'); |
|
|
|
|
|
|
|
|
|
$node = $this->getMockBuilder(Folder::class)->getMock(); |
|
|
|
|
$share = $this->newShare(); |
|
|
|
|
|