diff options
Diffstat (limited to 'apps/provisioning_api/tests/Controller/AppsControllerTest.php')
-rw-r--r-- | apps/provisioning_api/tests/Controller/AppsControllerTest.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/provisioning_api/tests/Controller/AppsControllerTest.php b/apps/provisioning_api/tests/Controller/AppsControllerTest.php index 7bd20e4233f..5cd440e4202 100644 --- a/apps/provisioning_api/tests/Controller/AppsControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppsControllerTest.php @@ -48,7 +48,7 @@ class AppsControllerTest extends \OCA\Provisioning_API\Tests\TestCase { /** @var IUserSession */ private $userSession; - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->appManager = \OC::$server->getAppManager(); @@ -72,11 +72,11 @@ class AppsControllerTest extends \OCA\Provisioning_API\Tests\TestCase { $this->assertEquals($expected, $result->getData()); } - /** - * @expectedException \OCP\AppFramework\OCS\OCSException - * @expectedExceptionCode 998 - */ + public function testGetAppInfoOnBadAppID() { + $this->expectException(\OCP\AppFramework\OCS\OCSException::class); + $this->expectExceptionCode(998); + $this->api->getAppInfo('not_provisioning_api'); } @@ -109,11 +109,11 @@ class AppsControllerTest extends \OCA\Provisioning_API\Tests\TestCase { $this->assertEquals(count($disabled), count($data['apps'])); } - /** - * @expectedException \OCP\AppFramework\OCS\OCSException - * @expectedExceptionCode 101 - */ + public function testGetAppsInvalidFilter() { + $this->expectException(\OCP\AppFramework\OCS\OCSException::class); + $this->expectExceptionCode(101); + $this->api->getApps('foo'); } } |