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)
43 lines
905 B
PHP
43 lines
905 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\Result;
|
|
use Doctrine\DBAL\Driver\Statement;
|
|
use EmptyIterator;
|
|
use IteratorAggregate;
|
|
use Traversable;
|
|
|
|
class StatementMock implements IteratorAggregate, Statement
|
|
{
|
|
public function bindValue($param, $value, $type = null): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function bindParam($param, &$variable, $type = null, $length = null): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function execute($params = null): Result
|
|
{
|
|
return new DriverResultMock();
|
|
}
|
|
|
|
public function getIterator(): Traversable
|
|
{
|
|
return new EmptyIterator();
|
|
}
|
|
}
|