diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-20 11:27:11 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-30 10:55:06 +0100 |
commit | 757aa45db7b884c28c118e28b7cd517059c61a32 (patch) | |
tree | 815796cfa49eea7d0e0827f222fc46b584cbb8a4 /apps/provisioning_api | |
parent | e265e982bf9f2572ef24d84dd777f48fff8993b4 (diff) | |
download | nextcloud-server-757aa45db7b884c28c118e28b7cd517059c61a32.tar.gz nextcloud-server-757aa45db7b884c28c118e28b7cd517059c61a32.zip |
Adding more DB groups to test suits
Adding more DB groups to test suits
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(); |