diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-10-26 14:00:57 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2020-10-26 16:05:28 +0100 |
commit | 951887e922bfc47613f0cfda5e7798df2b4286d6 (patch) | |
tree | b892dcc4555360e9d1abded632fed74fdfe6535a /apps/user_ldap/tests | |
parent | 2e455f632a9ed9003a624c0a06ab81eaf493ab23 (diff) | |
download | nextcloud-server-951887e922bfc47613f0cfda5e7798df2b4286d6.tar.gz nextcloud-server-951887e922bfc47613f0cfda5e7798df2b4286d6.zip |
fixes determining whether former user is a share owner
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/tests')
-rw-r--r-- | apps/user_ldap/tests/User/OfflineUserTest.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/user_ldap/tests/User/OfflineUserTest.php b/apps/user_ldap/tests/User/OfflineUserTest.php index 8c8835e9682..298e1708a58 100644 --- a/apps/user_ldap/tests/User/OfflineUserTest.php +++ b/apps/user_ldap/tests/User/OfflineUserTest.php @@ -78,10 +78,12 @@ class OfflineUserTest extends TestCase { public function testHasActiveShares(int $internalOwnerships, int $externalOwnerships, bool $expected) { $queryMock = $this->createMock(Statement::class); $queryMock->expects($this->atLeastOnce()) - ->method('fetchColumn') + ->method('execute'); + $queryMock->expects($this->atLeastOnce()) + ->method('rowCount') ->willReturnOnConsecutiveCalls( - (string)$internalOwnerships, - (string)$externalOwnerships + $internalOwnerships > 0 ? 1 : 0, + $externalOwnerships > 0 ? 1 : 0 ); $this->dbc->expects($this->atLeastOnce()) |