diff options
author | Joas Schilling <coding@schilljs.com> | 2017-03-20 10:02:05 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-03-20 10:33:16 +0100 |
commit | 591e75df5c3acf51e6968f20b1856481ee56f4de (patch) | |
tree | c0f3c7e9d01bb8a00024361541e152cef143f185 /tests | |
parent | c4b6ff0bab812ebda50406d630b171604fbaac72 (diff) | |
download | nextcloud-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.php | 7 |
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' )); |