summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-03-06 14:00:12 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2014-03-25 17:47:24 +0100
commitbc0292c16d5fa8e99727306ef703da1e018defa2 (patch)
treec8911e903fdce30975e71babfca3096e22b954a1 /tests
parent154277ab1139c0705be2947c4c9995794c7d092b (diff)
downloadnextcloud-server-bc0292c16d5fa8e99727306ef703da1e018defa2.tar.gz
nextcloud-server-bc0292c16d5fa8e99727306ef703da1e018defa2.zip
always return an array
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/share/share.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/share/share.php b/tests/lib/share/share.php
index b5cba9430aa..aae91fa1087 100644
--- a/tests/lib/share/share.php
+++ b/tests/lib/share/share.php
@@ -282,7 +282,7 @@ class Test_Share extends PHPUnit_Framework_TestCase {
OC_User::setUserId($this->user2);
$this->assertEquals(array(OCP\PERMISSION_READ), OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_PERMISSIONS));
OC_User::setUserId($this->user3);
- $this->assertFalse(OCP\Share::getItemSharedWith('test', 'test.txt'));
+ $this->assertSame(array(), OCP\Share::getItemSharedWith('test', 'test.txt'));
// Reshare again, and then have owner unshare
OC_User::setUserId($this->user1);
@@ -292,9 +292,9 @@ class Test_Share extends PHPUnit_Framework_TestCase {
OC_User::setUserId($this->user1);
$this->assertTrue(OCP\Share::unshare('test', 'test.txt', OCP\Share::SHARE_TYPE_USER, $this->user2));
OC_User::setUserId($this->user2);
- $this->assertFalse(OCP\Share::getItemSharedWith('test', 'test.txt'));
+ $this->assertSame(array(), OCP\Share::getItemSharedWith('test', 'test.txt'));
OC_User::setUserId($this->user3);
- $this->assertFalse(OCP\Share::getItemSharedWith('test', 'test.txt'));
+ $this->assertSame(array(), OCP\Share::getItemSharedWith('test', 'test.txt'));
// Attempt target conflict
OC_User::setUserId($this->user1);
@@ -325,7 +325,7 @@ class Test_Share extends PHPUnit_Framework_TestCase {
);
OC_User::setUserId($this->user2);
- $this->assertFalse(
+ $this->assertSame(array(),
OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_SOURCE),
'Failed asserting that user 2 no longer has access to test.txt after expiration.'
);
@@ -526,13 +526,13 @@ class Test_Share extends PHPUnit_Framework_TestCase {
);
OC_User::setUserId($this->user2);
- $this->assertFalse(
+ $this->assertSame(array(),
OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_SOURCE),
'Failed asserting that user 2 no longer has access to test.txt after expiration.'
);
OC_User::setUserId($this->user3);
- $this->assertFalse(
+ $this->assertSame(array(),
OCP\Share::getItemSharedWith('test', 'test.txt', Test_Share_Backend::FORMAT_SOURCE),
'Failed asserting that user 3 no longer has access to test.txt after expiration.'
);