mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
30 lines
749 B
PHP
30 lines
749 B
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\Driver\AbstractSQLiteDriver;
|
|
use Doctrine\DBAL\Driver\Connection as DriverConnection;
|
|
use Doctrine\DBAL\ServerVersionProvider;
|
|
|
|
class DriverMock extends AbstractSQLiteDriver
|
|
{
|
|
public function connect(array $params): DriverConnection
|
|
{
|
|
if (is_a(DriverConnection::class, ServerVersionProvider::class, true)) {
|
|
return new Dbal4DriverConnectionMock();
|
|
}
|
|
|
|
return new DriverConnectionMock();
|
|
}
|
|
}
|