summaryrefslogtreecommitdiffstats
path: root/apps/sharebymail/tests/ShareByMailProviderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/sharebymail/tests/ShareByMailProviderTest.php')
-rw-r--r--apps/sharebymail/tests/ShareByMailProviderTest.php38
1 files changed, 28 insertions, 10 deletions
diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php
index 2cc39ff9628..6285de2188c 100644
--- a/apps/sharebymail/tests/ShareByMailProviderTest.php
+++ b/apps/sharebymail/tests/ShareByMailProviderTest.php
@@ -545,10 +545,13 @@ class ShareByMailProviderTest extends TestCase {
);
$qb = $this->connection->getQueryBuilder();
- $result = $qb->select('*')
+ $qb->select('*')
->from('share')
- ->where($qb->expr()->eq('id', $qb->createNamedParameter($id)))
- ->execute()->fetchAll();
+ ->where($qb->expr()->eq('id', $qb->createNamedParameter($id)));
+
+ $qResult = $qb->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
$this->assertSame(1, count($result));
@@ -590,10 +593,13 @@ class ShareByMailProviderTest extends TestCase {
);
$qb = $this->connection->getQueryBuilder();
- $result = $qb->select('*')
+ $qb->select('*')
->from('share')
- ->where($qb->expr()->eq('id', $qb->createNamedParameter($id)))
- ->execute()->fetchAll();
+ ->where($qb->expr()->eq('id', $qb->createNamedParameter($id)));
+
+ $qResult = $qb->execute();
+ $result = $qResult->fetchAll();
+ $qResult->closeCursor();
$this->assertSame(1, count($result));
@@ -831,7 +837,10 @@ class ShareByMailProviderTest extends TestCase {
$query = $this->connection->getQueryBuilder();
$query->select('*')->from('share')
->where($query->expr()->eq('id', $query->createNamedParameter($id)));
- $before = $query->execute()->fetchAll();
+
+ $result = $query->execute();
+ $before = $result->fetchAll();
+ $result->closeCursor();
$this->assertTrue(is_array($before));
$this->assertSame(1, count($before));
@@ -841,7 +850,10 @@ class ShareByMailProviderTest extends TestCase {
$query = $this->connection->getQueryBuilder();
$query->select('*')->from('share')
->where($query->expr()->eq('id', $query->createNamedParameter($id)));
- $after = $query->execute()->fetchAll();
+
+ $result = $query->execute();
+ $after = $result->fetchAll();
+ $result->closeCursor();
$this->assertTrue(is_array($after));
$this->assertEmpty($after);
@@ -861,7 +873,10 @@ class ShareByMailProviderTest extends TestCase {
$query = $this->connection->getQueryBuilder();
$query->select('*')->from('share');
- $before = $query->execute()->fetchAll();
+
+ $result = $query->execute();
+ $before = $result->fetchAll();
+ $result->closeCursor();
$this->assertTrue(is_array($before));
$this->assertSame(2, count($before));
@@ -873,7 +888,10 @@ class ShareByMailProviderTest extends TestCase {
$query = $this->connection->getQueryBuilder();
$query->select('*')->from('share');
- $after = $query->execute()->fetchAll();
+
+ $result = $query->execute();
+ $after = $result->fetchAll();
+ $result->closeCursor();
$this->assertTrue(is_array($after));
$this->assertSame(1, count($after));