diff options
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/tests/appstest.php | 26 | ||||
-rw-r--r-- | apps/provisioning_api/tests/testcase.php | 5 |
2 files changed, 27 insertions, 4 deletions
diff --git a/apps/provisioning_api/tests/appstest.php b/apps/provisioning_api/tests/appstest.php index 2e1a86025c2..4ccba704a3a 100644 --- a/apps/provisioning_api/tests/appstest.php +++ b/apps/provisioning_api/tests/appstest.php @@ -23,15 +23,35 @@ */ namespace OCA\Provisioning_API\Tests; +use OCA\Provisioning_API\Apps; +use OCP\API; +use OCP\App\IAppManager; +use OCP\IUserSession; +/** + * Class AppsTest + * + * @group DB + * + * @package OCA\Provisioning_API\Tests + */ class AppsTest extends TestCase { - + + /** @var IAppManager */ + private $appManager; + + /** @var Apps */ + private $api; + + /** @var IUserSession */ + private $userSession; + public function setup() { parent::setup(); $this->appManager = \OC::$server->getAppManager(); $this->groupManager = \OC::$server->getGroupManager(); $this->userSession = \OC::$server->getUserSession(); - $this->api = new \OCA\Provisioning_API\Apps($this->appManager); + $this->api = new Apps($this->appManager); } public function testGetAppInfo() { @@ -46,7 +66,7 @@ class AppsTest extends TestCase { $result = $this->api->getAppInfo(['appid' => 'not_provisioning_api']); $this->assertInstanceOf('OC_OCS_Result', $result); $this->assertFalse($result->succeeded()); - $this->assertEquals(\OCP\API::RESPOND_NOT_FOUND, $result->getStatusCode()); + $this->assertEquals(API::RESPOND_NOT_FOUND, $result->getStatusCode()); } diff --git a/apps/provisioning_api/tests/testcase.php b/apps/provisioning_api/tests/testcase.php index 113bc512243..0cbe0d89f86 100644 --- a/apps/provisioning_api/tests/testcase.php +++ b/apps/provisioning_api/tests/testcase.php @@ -23,10 +23,13 @@ namespace OCA\Provisioning_API\Tests; +use OCP\IUser; use OCP\IUserManager; use OCP\IGroupManager; abstract class TestCase extends \Test\TestCase { + + /** @var IUser[] */ protected $users = array(); /** @var IUserManager */ @@ -46,7 +49,7 @@ abstract class TestCase extends \Test\TestCase { /** * Generates a temp user * @param int $num number of users to generate - * @return IUser[]|Iuser + * @return IUser[]|IUser */ protected function generateUsers($num = 1) { $users = array(); |