Introduce StatementMock to make testsuite ready for upcoming DBAL change
This commit is contained in:
parent
0a95e42ea8
commit
2dd2d694ca
@ -5,7 +5,7 @@ namespace Doctrine\Tests\Mocks;
|
|||||||
class DriverConnectionMock implements \Doctrine\DBAL\Driver\Connection
|
class DriverConnectionMock implements \Doctrine\DBAL\Driver\Connection
|
||||||
{
|
{
|
||||||
public function prepare($prepareString) {}
|
public function prepare($prepareString) {}
|
||||||
public function query() {}
|
public function query() { return new StatementMock; }
|
||||||
public function quote($input, $type=\PDO::PARAM_STR) {}
|
public function quote($input, $type=\PDO::PARAM_STR) {}
|
||||||
public function exec($statement) {}
|
public function exec($statement) {}
|
||||||
public function lastInsertId($name = null) {}
|
public function lastInsertId($name = null) {}
|
||||||
|
25
tests/Doctrine/Tests/Mocks/StatementMock.php
Normal file
25
tests/Doctrine/Tests/Mocks/StatementMock.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Doctrine\Tests\Mocks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is a mock of the Statement interface.
|
||||||
|
*
|
||||||
|
* @author Alexander <iam.asm89@gmail.com>
|
||||||
|
*/
|
||||||
|
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(){}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user