diff --git a/tests/Doctrine/Tests/Mocks/DriverConnectionMock.php b/tests/Doctrine/Tests/Mocks/DriverConnectionMock.php index 03d44caae..a18e24a4d 100644 --- a/tests/Doctrine/Tests/Mocks/DriverConnectionMock.php +++ b/tests/Doctrine/Tests/Mocks/DriverConnectionMock.php @@ -5,7 +5,7 @@ namespace Doctrine\Tests\Mocks; class DriverConnectionMock implements \Doctrine\DBAL\Driver\Connection { public function prepare($prepareString) {} - public function query() {} + public function query() { return new StatementMock; } public function quote($input, $type=\PDO::PARAM_STR) {} public function exec($statement) {} public function lastInsertId($name = null) {} @@ -14,4 +14,4 @@ class DriverConnectionMock implements \Doctrine\DBAL\Driver\Connection public function rollBack() {} public function errorCode() {} public function errorInfo() {} -} \ No newline at end of file +} diff --git a/tests/Doctrine/Tests/Mocks/StatementMock.php b/tests/Doctrine/Tests/Mocks/StatementMock.php new file mode 100644 index 000000000..2113cc48b --- /dev/null +++ b/tests/Doctrine/Tests/Mocks/StatementMock.php @@ -0,0 +1,25 @@ + + */ +class StatementMock implements \IteratorAggregate, \Doctrine\DBAL\Driver\Statement +{ + public function bindValue($param, $value, $type = null){} + public function bindParam($column, &$variable, $type = null){} + public function errorCode(){} + public function errorInfo(){} + public function execute($params = null){} + public function rowCount(){} + public function closeCursor(){} + public function columnCount(){} + public function setFetchMode($fetchStyle, $arg2 = null, $arg3 = null){} + public function fetch($fetchStyle = null){} + public function fetchAll($fetchStyle = null){} + public function fetchColumn($columnIndex = 0){} + public function getIterator(){} +}