Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5820f7

Browse files
committed
minor symfony#58118 [Messenger] fix test to be compatible with DBAL 4.2 (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Messenger] fix test to be compatible with DBAL 4.2 | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT see doctrine/dbal#6504 Commits ------- 447bf7e fix test to be compatible with DBAL 4.2
2 parents aeea0a5 + 447bf7e commit c5820f7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/PostgreSqlConnectionTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

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

14-
use Doctrine\DBAL\Cache\ArrayResult;
1514
use Doctrine\DBAL\Cache\ArrayStatement;
15+
use Doctrine\DBAL\Driver\Result as DriverResult;
1616
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
1717
use Doctrine\DBAL\Query\QueryBuilder;
1818
use Doctrine\DBAL\Result;
@@ -95,10 +95,13 @@ public function countNotifyCalls()
9595
->method('getNativeConnection')
9696
->willReturn($wrappedConnection);
9797

98+
$driverResult = $this->createMock(DriverResult::class);
99+
$driverResult->method('fetchAssociative')
100+
->willReturn(false);
98101
$driverConnection
99102
->expects(self::any())
100103
->method('executeQuery')
101-
->willReturn(new Result(new ArrayResult([]), $driverConnection));
104+
->willReturn(new Result($driverResult, $driverConnection));
102105
}
103106
$connection = new PostgreSqlConnection(['table_name' => 'queue_table'], $driverConnection);
104107

0 commit comments

Comments
 (0)