From 42b51cb50f3b185fe46d265e0f9e4a8265f94336 Mon Sep 17 00:00:00 2001 From: Hannes Bochmann Date: Mon, 30 Oct 2023 14:56:40 +0100 Subject: [PATCH] Bugfix fix queries --- Classes/Repository/CacheTagsRepository.php | 4 ++-- Tests/Unit/Repository/CacheTagsRepositoryTest.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Classes/Repository/CacheTagsRepository.php b/Classes/Repository/CacheTagsRepository.php index b16ed07..c4f72a0 100644 --- a/Classes/Repository/CacheTagsRepository.php +++ b/Classes/Repository/CacheTagsRepository.php @@ -51,7 +51,7 @@ public function insertByTagAndCacheHash(string $tag, string $cacheHash): void 'tag' => $tag, 'cache_hash' => $cacheHash, ]) - ->executeQuery(); + ->executeStatement (); } public function getByCacheHash(string $cacheHash): \Traversable @@ -74,7 +74,7 @@ public function deleteByCacheHash(string $cacheHash): void ->where( $queryBuilder->expr()->eq('cache_hash', $queryBuilder->createNamedParameter($cacheHash)) ) - ->executeQuery(); + ->executeStatement(); } /** diff --git a/Tests/Unit/Repository/CacheTagsRepositoryTest.php b/Tests/Unit/Repository/CacheTagsRepositoryTest.php index 038acda..7c94ac5 100644 --- a/Tests/Unit/Repository/CacheTagsRepositoryTest.php +++ b/Tests/Unit/Repository/CacheTagsRepositoryTest.php @@ -76,7 +76,7 @@ public function testInsertByTagAndCacheHash() { $queryBuilder = $this->getMockBuilder(QueryBuilder::class) ->disableOriginalConstructor() - ->setMethods(['insert', 'values', 'executeQuery']) + ->setMethods(['insert', 'values', 'executeStatement']) ->getMock(); $queryBuilder @@ -98,7 +98,7 @@ public function testInsertByTagAndCacheHash() ->willReturn($queryBuilder); $queryBuilder ->expects(self::once()) - ->method('executeQuery'); + ->method('executeStatement'); $repository = $this->getMockBuilder(CacheTagsRepository::class) ->setMethods(['getQueryBuilder']) @@ -190,7 +190,7 @@ public function testDeleteByCacheHash() { $queryBuilder = $this->getMockBuilder(QueryBuilder::class) ->disableOriginalConstructor() - ->setMethods(['delete', 'where', 'executeQuery', 'expr', 'createNamedParameter']) + ->setMethods(['delete', 'where', 'executeStatement', 'expr', 'createNamedParameter']) ->getMock(); $expressionBuilder = $this->getMockBuilder(ExpressionBuilder::class) @@ -223,7 +223,7 @@ public function testDeleteByCacheHash() $queryBuilder ->expects(self::once()) - ->method('executeQuery'); + ->method('executeStatement'); $queryBuilder ->expects(self::once())