Address warning from PHPUnit

This hack is temporary and should be removed on 3.0.x
parent 7fc2268f
...@@ -22,7 +22,6 @@ use Doctrine\DBAL\Logging\DebugStack; ...@@ -22,7 +22,6 @@ use Doctrine\DBAL\Logging\DebugStack;
use Doctrine\DBAL\Logging\EchoSQLLogger; use Doctrine\DBAL\Logging\EchoSQLLogger;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\VersionAwarePlatformDriver;
use Doctrine\Tests\DbalTestCase; use Doctrine\Tests\DbalTestCase;
use Exception; use Exception;
use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\MockObject\MockObject;
...@@ -762,7 +761,7 @@ class ConnectionTest extends DbalTestCase ...@@ -762,7 +761,7 @@ class ConnectionTest extends DbalTestCase
*/ */
public function testPlatformDetectionIsTriggerOnlyOnceOnRetrievingPlatform() : void public function testPlatformDetectionIsTriggerOnlyOnceOnRetrievingPlatform() : void
{ {
$driverMock = $this->createMock([Driver::class, VersionAwarePlatformDriver::class]); $driverMock = $this->createMock(FutureVersionAwarePlatformDriver::class);
$driverConnectionMock = $this->createMock(ServerInfoAwareConnection::class); $driverConnectionMock = $this->createMock(ServerInfoAwareConnection::class);
...@@ -883,7 +882,7 @@ class ConnectionTest extends DbalTestCase ...@@ -883,7 +882,7 @@ class ConnectionTest extends DbalTestCase
*/ */
public function testRethrowsOriginalExceptionOnDeterminingPlatformWhenConnectingToNonExistentDatabase() : void public function testRethrowsOriginalExceptionOnDeterminingPlatformWhenConnectingToNonExistentDatabase() : void
{ {
$driverMock = $this->createMock([Driver::class, VersionAwarePlatformDriver::class]); $driverMock = $this->createMock(FutureVersionAwarePlatformDriver::class);
$connection = new Connection(['dbname' => 'foo'], $driverMock); $connection = new Connection(['dbname' => 'foo'], $driverMock);
$originalException = new Exception('Original exception'); $originalException = new Exception('Original exception');
......
<?php
declare(strict_types=1);
namespace Doctrine\Tests\DBAL;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\VersionAwarePlatformDriver;
/**
* Remove me in 3.0.x
*/
interface FutureVersionAwarePlatformDriver extends VersionAwarePlatformDriver, Driver
{
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment