summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/api.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-09-29 22:20:42 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-09-29 22:20:42 +0200
commit258e8d58da8ee1abcf4a89049c75f24a398daa75 (patch)
treeb137215cbc1da0e3000a605dfa671ffd789b3abf /apps/files_sharing/tests/api.php
parent63ea6844e8a943fe8dfa02a0b8d1fbef288d7278 (diff)
downloadnextcloud-server-258e8d58da8ee1abcf4a89049c75f24a398daa75.tar.gz
nextcloud-server-258e8d58da8ee1abcf4a89049c75f24a398daa75.zip
flipping arguments on assertEquals() - first argument contains the expected value and second argument contains the value to be asserted
Diffstat (limited to 'apps/files_sharing/tests/api.php')
-rw-r--r--apps/files_sharing/tests/api.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
index 1b278be3032..f5897a22d8f 100644
--- a/apps/files_sharing/tests/api.php
+++ b/apps/files_sharing/tests/api.php
@@ -228,7 +228,7 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
$result = \OCP\Share::getItemShared('file', $fileInfo['fileid']);
- $this->assertEquals(count($result), 1);
+ $this->assertEquals(1, count($result));
// get first element
$share = reset($result);
@@ -240,7 +240,7 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
$this->assertTrue($result->succeeded());
// test should return one share created from testCreateShare()
- $this->assertEquals(count($result->getData()), 1);
+ $this->assertEquals(1, count($result->getData()));
\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
\Test_Files_Sharing_Api::TEST_FILES_SHARING_API_USER2);
@@ -304,7 +304,7 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
// update permissions
- $this->assertEquals($userShare['permissions'], '31');
+ $this->assertEquals('31', $userShare['permissions']);
$params = array();
$params['id'] = $userShare['id'];
@@ -327,7 +327,7 @@ class Test_Files_Sharing_Api extends \PHPUnit_Framework_TestCase {
$this->assertTrue(is_array($newUserShare));
- $this->assertEquals($newUserShare['permissions'], '1');
+ $this->assertEquals('1', $newUserShare['permissions']);
// update password for link share