diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-08-28 00:35:10 +0200 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-08-28 00:35:10 +0200 |
commit | 07df52c9980286aaa78fca0f3aed6372f6c1ae51 (patch) | |
tree | 853abbcbb72b68f13e1833579672d5f23dce8d3a /tests/lib/share | |
parent | 2abb63de702b74617cb5d1bff54d1066a788bddf (diff) | |
download | nextcloud-server-07df52c9980286aaa78fca0f3aed6372f6c1ae51.tar.gz nextcloud-server-07df52c9980286aaa78fca0f3aed6372f6c1ae51.zip |
assert array length and individual content instead of assertEqual on arrays
Diffstat (limited to 'tests/lib/share')
-rw-r--r-- | tests/lib/share/share.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php index 8f621b9e1c8..22de5691036 100644 --- a/tests/lib/share/share.php +++ b/tests/lib/share/share.php @@ -247,7 +247,6 @@ class Test_Share extends UnitTestCase { $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); @@ -363,7 +362,12 @@ class Test_Share extends UnitTestCase { OC_User::setUserId($this->user3); $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_GROUP, $this->group1, OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE)); 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->dump($to_test, "array of shared items in test"); + //$this->assertEqual(OCP\Share::getItemsSharedWith('test', Test_Share_Backend::FORMAT_TARGET), array('test.txt', 'test1.txt')); // // Valid reshare TODO Broken // $this->assertTrue(OCP\Share::shareItem('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user4, OCP\Share::PERMISSION_READ | OCP\Share::PERMISSION_SHARE)); |