diff options
author | anoy <anoymouserver+github@mailbox.org> | 2021-07-17 19:33:36 +0200 |
---|---|---|
committer | anoy <anoymouserver@users.noreply.github.com> | 2021-07-17 20:31:29 +0200 |
commit | ed066a812914b84c8f0c44e0e6be432638a3e038 (patch) | |
tree | 8311efdc0706f0ae53625bf2cb41cb2e2be85d03 /tests/Unit/Db/MapperTestUtility.php | |
parent | 6515a297d8f54594b77b95dd4bcf245544fdb21e (diff) |
adapt tests to QBMapper changes in NC22
Signed-off-by: anoy <anoymouserver+github@mailbox.org>
Diffstat (limited to 'tests/Unit/Db/MapperTestUtility.php')
-rw-r--r-- | tests/Unit/Db/MapperTestUtility.php | 19 |
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(); } } |