summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Db/MapperTestUtility.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Db/MapperTestUtility.php')
-rw-r--r--tests/Unit/Db/MapperTestUtility.php19
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/Unit/Db/MapperTestUtility.php b/tests/Unit/Db/MapperTestUtility.php
index b5ef782c2..5c58613ee 100644
--- a/tests/Unit/Db/MapperTestUtility.php
+++ b/tests/Unit/Db/MapperTestUtility.php
@@ -23,11 +23,10 @@
namespace OCA\News\Tests\Unit\Db;
-use Doctrine\DBAL\Driver\Statement;
+use OCP\DB\IResult;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IDBConnection;
-use PDOStatement;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
@@ -43,17 +42,12 @@ abstract class MapperTestUtility extends TestCase
protected $db;
/**
- * @var MockObject|PDOStatement
- */
- protected $query;
-
- /**
* @var MockObject|IQueryBuilder
*/
protected $builder;
/**
- * @var MockObject|Statement
+ * @var MockObject|IResult
*/
protected $cursor;
@@ -70,15 +64,12 @@ abstract class MapperTestUtility extends TestCase
->disableOriginalConstructor()
->getMock();
- $this->query = $this->getMockBuilder(PDOStatement::class)
- ->getMock();
-
$this->builder = $this->getMockBuilder(IQueryBuilder::class)
->disableOriginalConstructor()
->getMock();
- $this->cursor = $this->getMockBuilder(Statement::class)
- ->addMethods(['fetch', 'closeCursor'])
- ->getMockForAbstractClass();
+ $this->cursor = $this->getMockBuilder(IResult::class)
+ ->disableOriginalConstructor()
+ ->getMock();
}
}