Sylius/tests/Functional/Doctrine/Mock/StatementMock.php
Rafikooo bd364048bb
Fix DBAL 4.x mock compatibility in tests
- 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)
2026-06-17 14:33:44 +02:00

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();
}
}