Skip to content

Commit

Permalink
Bugfix fix queries
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesbochmann committed Oct 30, 2023
1 parent 7ab1d19 commit 42b51cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Classes/Repository/CacheTagsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -74,7 +74,7 @@ public function deleteByCacheHash(string $cacheHash): void
->where(
$queryBuilder->expr()->eq('cache_hash', $queryBuilder->createNamedParameter($cacheHash))
)
->executeQuery();
->executeStatement();
}

/**
Expand Down
8 changes: 4 additions & 4 deletions Tests/Unit/Repository/CacheTagsRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function testInsertByTagAndCacheHash()
{
$queryBuilder = $this->getMockBuilder(QueryBuilder::class)
->disableOriginalConstructor()
->setMethods(['insert', 'values', 'executeQuery'])
->setMethods(['insert', 'values', 'executeStatement'])
->getMock();

$queryBuilder
Expand All @@ -98,7 +98,7 @@ public function testInsertByTagAndCacheHash()
->willReturn($queryBuilder);
$queryBuilder
->expects(self::once())
->method('executeQuery');
->method('executeStatement');

$repository = $this->getMockBuilder(CacheTagsRepository::class)
->setMethods(['getQueryBuilder'])
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -223,7 +223,7 @@ public function testDeleteByCacheHash()

$queryBuilder
->expects(self::once())
->method('executeQuery');
->method('executeStatement');

$queryBuilder
->expects(self::once())
Expand Down

0 comments on commit 42b51cb

Please sign in to comment.