summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-10-21 00:03:40 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-10-21 00:03:40 +0200
commitafafd2f69e962a4819c52f72cd22a5c28cf5a279 (patch)
tree021a3752ed0dd1ae9d379d7e872f9071730f618b
parenta0e479342c9f5f293e7c83be101b47c8e2ac8891 (diff)
parentaeffd511459bbefc4b2a338e67494786e14a6eee (diff)
downloadnextcloud-server-afafd2f69e962a4819c52f72cd22a5c28cf5a279.tar.gz
nextcloud-server-afafd2f69e962a4819c52f72cd22a5c28cf5a279.zip
Merge pull request #19907 from owncloud/scrutinizer_provisioning_api
Fix scrutinizer issues in provisioning API
-rw-r--r--apps/provisioning_api/tests/testcase.php2
-rw-r--r--apps/provisioning_api/tests/userstest.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/provisioning_api/tests/testcase.php b/apps/provisioning_api/tests/testcase.php
index cc8f5c1d16d..6135a6d2f96 100644
--- a/apps/provisioning_api/tests/testcase.php
+++ b/apps/provisioning_api/tests/testcase.php
@@ -46,7 +46,7 @@ abstract class TestCase extends \Test\TestCase {
/**
* Generates a temp user
* @param int $num number of users to generate
- * @return array
+ * @return IUser[]|Iuser
*/
protected function generateUsers($num = 1) {
$users = array();
diff --git a/apps/provisioning_api/tests/userstest.php b/apps/provisioning_api/tests/userstest.php
index 3869af87e5a..673383edae6 100644
--- a/apps/provisioning_api/tests/userstest.php
+++ b/apps/provisioning_api/tests/userstest.php
@@ -234,7 +234,7 @@ class UsersTest extends TestCase {
$user = $this->generateUsers();
$user->setDisplayName('foobar');
$this->userSession->setUser($user);
- $params['userid'] = $user->getUID();
+ $params = ['userid' => $user->getUID()];
$result = $this->api->getUser($params);
$this->assertInstanceOf('OC_OCS_Result', $result);
$this->assertTrue($result->succeeded());
@@ -261,7 +261,7 @@ class UsersTest extends TestCase {
public function testGetUserOnOtherUser() {
$users = $this->generateUsers(2);
- $params['userid'] = $users[0];
+ $params = ['userid' => $users[0]->getUID()];
$this->userSession->setUser($users[1]);
$result = $this->api->getUser($params);
$this->assertInstanceOf('OC_OCS_Result', $result);