aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2012-08-28 00:12:01 +0200
committerThomas Mueller <thomas.mueller@tmit.eu>2012-08-28 00:12:01 +0200
commit2abb63de702b74617cb5d1bff54d1066a788bddf (patch)
tree430cf5ba77e2adbedfac4b1f1adcb5101206469f /tests
parent09300e5f6ea80dd96fbd3edaa8cea01022c02507 (diff)
downloadnextcloud-server-2abb63de702b74617cb5d1bff54d1066a788bddf.tar.gz
nextcloud-server-2abb63de702b74617cb5d1bff54d1066a788bddf.zip
assert array length and individual content instead of assertEqual on arrays
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/share/share.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php
index 303790b4868..8f621b9e1c8 100644
--- a/tests/lib/share/share.php
+++ b/tests/lib/share/share.php
@@ -241,8 +241,13 @@ class Test_Share extends UnitTestCase {
$this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\Share::PERMISSION_READ));
OC_User::setUserId($this->user3);
$this->assertTrue(OCP\Share::shareItem('test', 'share.txt', OCP\Share::SHARE_TYPE_USER, $this->user2, OCP\Share::PERMISSION_READ));
+
OC_User::setUserId($this->user2);
- $this->assertEqual(OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET), array('test.txt', 'test1.txt'));
+ $to_test = OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET);
+ $this->assertEqual(count($to_test), 2);
+ $this->assertTrue(in_array('test.txt', $to_test));
+ $this->assertTrue(in_array('test1.txt', $to_test));
+ //$this->assertEqual($to_test, array('test.txt', 'test1.txt'));
// Remove user
OC_User::deleteUser($this->user1);