summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-20 10:02:05 +0100
committerJoas Schilling <coding@schilljs.com>2017-03-20 10:33:16 +0100
commit591e75df5c3acf51e6968f20b1856481ee56f4de (patch)
treec0f3c7e9d01bb8a00024361541e152cef143f185 /tests
parentc4b6ff0bab812ebda50406d630b171604fbaac72 (diff)
downloadnextcloud-server-591e75df5c3acf51e6968f20b1856481ee56f4de.tar.gz
nextcloud-server-591e75df5c3acf51e6968f20b1856481ee56f4de.zip
Don't use a generic exception
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/App/ManagerTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/App/ManagerTest.php b/tests/lib/App/ManagerTest.php
index 8b23168938c..59ef9a36bf2 100644
--- a/tests/lib/App/ManagerTest.php
+++ b/tests/lib/App/ManagerTest.php
@@ -134,10 +134,11 @@ class ManagerTest extends TestCase {
try {
$this->manager->enableApp('some_random_name_which_i_hope_is_not_an_app');
$this->assertFalse(true, 'If this line is reached the expected exception is not thrown.');
- } catch (\Exception $e) {
- // excpetion is expected
- $this->assertEquals("some_random_name_which_i_hope_is_not_an_app can't be enabled since it is not installed.", $e->getMessage());
+ } catch (AppPathNotFoundException $e) {
+ // Exception is expected
+ $this->assertEquals('Could not find path for some_random_name_which_i_hope_is_not_an_app', $e->getMessage());
}
+
$this->assertEquals('no', $this->appConfig->getValue(
'some_random_name_which_i_hope_is_not_an_app', 'enabled', 'no'
));