diff options
Diffstat (limited to 'tests/Unit/Db/MapperTestUtility.php')
-rw-r--r-- | tests/Unit/Db/MapperTestUtility.php | 8 |
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(); } } |