Skip to content

Commit 1f6e416

Browse files
committed
Fixed test failures on PHP 7.4
The failures are caused by the changes in PHP according to https://wiki.php.net/rfc/notice-for-non-valid-array-container.
1 parent bf9d55c commit 1f6e416

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ public function testExecute(array $params) : void
5959
$this->equalTo($params[2])
6060
);
6161

62+
// the return value is irrelevant to the test
63+
// but it has to be compatible with the method signature
64+
$statement->method('errorInfo')
65+
->willReturn(false);
66+
6267
// can't pass to constructor since we don't have a real database handle,
6368
// but execute must check the connection for the executeMode
6469
$conn = $this->getMockBuilder(OCI8Connection::class)

tests/Doctrine/Tests/DBAL/Sharding/PoolingShardManagerTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public function testSelectGlobal() : void
4747
{
4848
$conn = $this->createConnectionMock();
4949
$conn->expects($this->once())->method('connect')->with($this->equalTo(0));
50+
$conn->method('getParams')
51+
->willReturn([
52+
'shardChoser' => $this->createMock(ShardChoser::class),
53+
]);
5054

5155
$shardManager = new PoolingShardManager($conn);
5256
$shardManager->selectGlobal();

0 commit comments

Comments
 (0)