summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Db/MapperTestUtility.php
diff options
context:
space:
mode:
authorSean Molenaar <sean@seanmolenaar.eu>2021-01-08 22:45:43 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-01-12 13:29:08 +0100
commitf7b43501afa339dd11abca62c5e8eaa9a2c67d4e (patch)
tree4a2a7dd046e49a9225b54016c118f2103b05f837 /tests/Unit/Db/MapperTestUtility.php
parent7cc22415a03889d5de3b90018bdc38ab2995e4f3 (diff)
Fix nc 21 phpunit issue
Diffstat (limited to 'tests/Unit/Db/MapperTestUtility.php')
-rw-r--r--tests/Unit/Db/MapperTestUtility.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/Unit/Db/MapperTestUtility.php b/tests/Unit/Db/MapperTestUtility.php
index 725f0c3c0..3aa1d8aed 100644
--- a/tests/Unit/Db/MapperTestUtility.php
+++ b/tests/Unit/Db/MapperTestUtility.php
@@ -23,12 +23,11 @@
namespace OCA\News\Tests\Unit\Db;
-use Doctrine\DBAL\Driver\PDOStatement;
use Doctrine\DBAL\Driver\Statement;
-use OCA\News\Tests\Unit\Service\ServiceTest;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
+use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -71,13 +70,14 @@ abstract class MapperTestUtility extends TestCase
->disableOriginalConstructor()
->getMock();
- $this->query = $this->getMockBuilder(\PDOStatement::class)
+ $this->query = $this->getMockBuilder(PDOStatement::class)
->getMock();
$this->builder = $this->getMockBuilder(IQueryBuilder::class)
->getMock();
$this->cursor = $this->getMockBuilder(Statement::class)
- ->getMock();
+ ->addMethods(['fetch', 'closeCursor'])
+ ->getMockForAbstractClass();
}
}