diff --git a/src/Test/TestConnection.php b/src/Test/TestConnection.php index 981696b..bf03c12 100644 --- a/src/Test/TestConnection.php +++ b/src/Test/TestConnection.php @@ -13,4 +13,38 @@ public function __construct() { $this->adapter = new TestAdapter(); } + + public function connect() + { + return $this; + } + + public function beginTransaction() + { + throw new \LogicException('Transactions are not supported by the test connection'); + } + + public function commitTransaction() + { + throw new \LogicException('Transactions are not supported by the test connection'); + } + + public function rollbackTransaction() + { + throw new \LogicException('Transactions are not supported by the test connection'); + } + + public function prepexec($stmt, $values = null) + { + return new class extends \PDOStatement { + public function getIterator(): \Iterator + { + return new \ArrayIterator([]); + } + + public function setFetchMode($mode, ...$args) + { + } + }; + } }