Skip to content

Commit

Permalink
Fixed test failures on PHP 7.4
Browse files Browse the repository at this point in the history
The failures are caused by the changes in PHP according to https://wiki.php.net/rfc/notice-for-non-valid-array-container.
  • Loading branch information
morozov committed Aug 3, 2019
1 parent bf9d55c commit 1f6e416
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public function testExecute(array $params) : void
$this->equalTo($params[2])
);

// the return value is irrelevant to the test
// but it has to be compatible with the method signature
$statement->method('errorInfo')
->willReturn(false);

// can't pass to constructor since we don't have a real database handle,
// but execute must check the connection for the executeMode
$conn = $this->getMockBuilder(OCI8Connection::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public function testSelectGlobal() : void
{
$conn = $this->createConnectionMock();
$conn->expects($this->once())->method('connect')->with($this->equalTo(0));
$conn->method('getParams')
->willReturn([
'shardChoser' => $this->createMock(ShardChoser::class),
]);

$shardManager = new PoolingShardManager($conn);
$shardManager->selectGlobal();
Expand Down

0 comments on commit 1f6e416

Please sign in to comment.