diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/App/ManagerTest.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/lib/App/ManagerTest.php b/tests/lib/App/ManagerTest.php index 79450737266..8b23168938c 100644 --- a/tests/lib/App/ManagerTest.php +++ b/tests/lib/App/ManagerTest.php @@ -130,11 +130,14 @@ class ManagerTest extends TestCase { $this->assertEquals('no', $this->appConfig->getValue('files_trashbin', 'enabled', 'no')); } - /** - * @expectedException \Exception - */ public function testNotEnableIfNotInstalled() { - $this->manager->enableApp('some_random_name_which_i_hope_is_not_an_app'); + 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()); + } $this->assertEquals('no', $this->appConfig->getValue( 'some_random_name_which_i_hope_is_not_an_app', 'enabled', 'no' )); |