Skip to content

Commit

Permalink
fix test to be compatible with DBAL 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Aug 29, 2024
1 parent f58bc70 commit 38b003c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tests/Transport/PostgreSqlConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Component\Messenger\Bridge\Doctrine\Tests\Transport;

use Doctrine\DBAL\Cache\ArrayResult;
use Doctrine\DBAL\Cache\ArrayStatement;
use Doctrine\DBAL\Driver\Result as DriverResult;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\DBAL\Result;
Expand Down Expand Up @@ -95,10 +95,13 @@ public function countNotifyCalls()
->method('getNativeConnection')
->willReturn($wrappedConnection);

$driverResult = $this->createMock(DriverResult::class);
$driverResult->method('fetchAssociative')
->willReturn(false);
$driverConnection
->expects(self::any())
->method('executeQuery')
->willReturn(new Result(new ArrayResult([]), $driverConnection));
->willReturn(new Result($driverResult, $driverConnection));
}
$connection = new PostgreSqlConnection(['table_name' => 'queue_table'], $driverConnection);

Expand Down

0 comments on commit 38b003c

Please sign in to comment.