aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php10
-rw-r--r--apps/files_sharing/tests/Migration/SetPasswordColumnTest.php4
2 files changed, 11 insertions, 3 deletions
diff --git a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php
index dd03ffc6668..b163583bf11 100644
--- a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php
+++ b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php
@@ -142,7 +142,10 @@ class CleanupRemoteStoragesTest extends TestCase {
$qb->select('*')
->from('storages')
->where($qb->expr()->eq('numeric_id', $qb->createNamedParameter($numericId)));
- $result = $qb->execute()->fetchAll();
+
+ $qResult = $qb->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
if (!empty($result)) {
return true;
}
@@ -151,7 +154,10 @@ class CleanupRemoteStoragesTest extends TestCase {
$qb->select('*')
->from('filecache')
->where($qb->expr()->eq('storage', $qb->createNamedParameter($numericId)));
- $result = $qb->execute()->fetchAll();
+
+ $qResult = $qb->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
if (!empty($result)) {
return true;
}
diff --git a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php
index 05cb34ac506..a0e8720d17c 100644
--- a/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php
+++ b/apps/files_sharing/tests/Migration/SetPasswordColumnTest.php
@@ -107,7 +107,9 @@ class SetPasswordColumnTest extends TestCase {
$query = $this->connection->getQueryBuilder();
$query->select('*')
->from('share');
- $allShares = $query->execute()->fetchAll();
+ $result = $query->execute();
+ $allShares = $result->fetchAll();
+ $result->closeCursor();
foreach ($allShares as $share) {
if ((int)$share['share_type'] === IShare::TYPE_LINK) {