diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-03 13:36:14 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-03 13:36:14 +0100 |
commit | aaf7299d2813c1b1b206459b2d7997d3e1cd0526 (patch) | |
tree | 4e9905b450d762fcc3abe7a1e8643aedc0c15310 /tests | |
parent | cf81574e877a6468358cc4a1e52cc078b6b01823 (diff) | |
parent | dc32f49c6ee25770b461f11287fd9695f2429c91 (diff) | |
download | nextcloud-server-aaf7299d2813c1b1b206459b2d7997d3e1cd0526.tar.gz nextcloud-server-aaf7299d2813c1b1b206459b2d7997d3e1cd0526.zip |
Merge pull request #22070 from owncloud/share2_exceptions
Add sharing exceptions to OCP
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/share20/defaultshareprovidertest.php | 4 | ||||
-rw-r--r-- | tests/lib/share20/managertest.php | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/share20/defaultshareprovidertest.php b/tests/lib/share20/defaultshareprovidertest.php index 504bd776036..32c0b342c41 100644 --- a/tests/lib/share20/defaultshareprovidertest.php +++ b/tests/lib/share20/defaultshareprovidertest.php @@ -110,7 +110,7 @@ class DefaultShareProviderTest extends \Test\TestCase { /** - * @expectedException \OC\Share20\Exception\ShareNotFound + * @expectedException \OCP\Share\Exceptions\ShareNotFound */ public function testGetShareByIdNotExist() { $this->provider->getShareById(1); @@ -809,7 +809,7 @@ class DefaultShareProviderTest extends \Test\TestCase { } /** - * @expectedException \OC\Share20\Exception\ShareNotFound + * @expectedException \OCP\Share\Exceptions\ShareNotFound */ public function testGetShareByTokenNotFound() { $this->provider->getShareByToken('invalidtoken'); diff --git a/tests/lib/share20/managertest.php b/tests/lib/share20/managertest.php index 6043d30a0bb..34cc39a77df 100644 --- a/tests/lib/share20/managertest.php +++ b/tests/lib/share20/managertest.php @@ -129,7 +129,7 @@ class ManagerTest extends \Test\TestCase { } /** - * @expectedException \OC\Share20\Exception\ShareNotFound + * @expectedException \OCP\Share\Exceptions\ShareNotFound */ public function testDeleteNoShareId() { $share = $this->getMock('\OCP\Share\IShare'); @@ -586,7 +586,7 @@ class ManagerTest extends \Test\TestCase { try { $this->invokePrivate($this->manager, 'generalCreateChecks', [$share]); $thrown = false; - } catch (\OC\HintException $e) { + } catch (\OCP\Share\Exceptions\GenericShareException $e) { $this->assertEquals($exceptionMessage, $e->getHint()); $thrown = true; } catch(\InvalidArgumentException $e) { @@ -598,7 +598,7 @@ class ManagerTest extends \Test\TestCase { } /** - * @expectedException \OC\HintException + * @expectedException \OCP\Share\Exceptions\GenericShareException * @expectedExceptionMessage Expiration date is in the past */ public function testvalidateExpirationDateInPast() { @@ -644,7 +644,7 @@ class ManagerTest extends \Test\TestCase { try { $this->invokePrivate($this->manager, 'validateExpirationDate', [$share]); - } catch (\OC\HintException $e) { + } catch (\OCP\Share\Exceptions\GenericShareException $e) { $this->assertEquals('Cannot set expiration date more than 3 days in the future', $e->getMessage()); $this->assertEquals('Cannot set expiration date more than 3 days in the future', $e->getHint()); $this->assertEquals(404, $e->getCode()); |