mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
- Update DriverMock::connect() signature for DBAL 4.x
- Add return types to DriverConnectionMock methods
- Add return types to StatementMock methods
- Add return types to DatabasePlatformMock methods
(cherry picked from commit 1c9cd7c243)
44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Sylius package.
|
|
*
|
|
* (c) Sylius Sp. z o.o.
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Sylius\Tests\Functional\Doctrine\Mock;
|
|
|
|
use Doctrine\DBAL\Connection;
|
|
use Doctrine\DBAL\Driver;
|
|
use Doctrine\DBAL\Driver\API\ExceptionConverter;
|
|
use Doctrine\DBAL\Driver\Connection as DriverConnection;
|
|
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
|
use Doctrine\DBAL\Schema\AbstractSchemaManager;
|
|
|
|
class DriverMock implements Driver
|
|
{
|
|
public function connect(array $params): DriverConnection
|
|
{
|
|
return new DriverConnectionMock();
|
|
}
|
|
|
|
public function getDatabasePlatform(): AbstractPlatform
|
|
{
|
|
throw new \BadMethodCallException('Not implemented');
|
|
}
|
|
|
|
public function getSchemaManager(Connection $conn, ?AbstractPlatform $platform = null): AbstractSchemaManager
|
|
{
|
|
throw new \BadMethodCallException('Not implemented');
|
|
}
|
|
|
|
public function getExceptionConverter(): ExceptionConverter
|
|
{
|
|
throw new \BadMethodCallException('Not implemented');
|
|
}
|
|
}
|