diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-12 19:28:24 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-12 19:28:24 +0200 |
commit | 8c281a456d413d758c813b12eaeaadd2c89c7302 (patch) | |
tree | 3f331ebda22536b638ecd0e180ccdd28ef357616 /tests | |
parent | a0b15dcb12b0f8ae3063bf4d1571d6defea503ea (diff) | |
download | nextcloud-server-8c281a456d413d758c813b12eaeaadd2c89c7302.tar.gz nextcloud-server-8c281a456d413d758c813b12eaeaadd2c89c7302.zip |
PHPUnit 3.6 does not support @expectedException with the generic exception class
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/share/share.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index 48d0270cc57..7f6784f8df7 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -61,11 +61,13 @@ class Test_Share extends UnitTestCase { $query->execute(array('test')); } - /** - * @expectedException Exception - */ public function testShareInvalidShareType() { - OCP\Share::shareItem('test', 'test.txt', 'foobar', $this->user2, OCP\Share::PERMISSION_READ); + $message = 'Share type foobar is not valid for test.txt'; + try { + OCP\Share::shareItem('test', 'test.txt', 'foobar', $this->user2, OCP\Share::PERMISSION_READ); + } catch (Exception $exception) { + $this->assertEqual($exception->getMessage(), $message); + } } public function testInvalidItemType() { |