1
0
mirror of synced 2025-02-02 21:41:45 +03:00

Merge pull request #6491 from SamKnows/fix/mock-implementations

Fix Mock Implementations.
This commit is contained in:
Marco Pivetta 2017-06-08 19:06:25 +02:00 committed by GitHub
commit 049ad1e079
3 changed files with 9 additions and 10 deletions

View File

@ -30,13 +30,12 @@ class HydratorMockStatement implements \IteratorAggregate, Statement
/**
* Fetches all rows from the result set.
*
* @param int|null $fetchStyle
* @param int|null $columnIndex
* @param int|null $fetchMode
* @param int|null $fetchArgument
* @param array|null $ctorArgs
*
* @return array
*/
public function fetchAll($fetchStyle = null, $columnIndex = null, array $ctorArgs = null)
public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
{
return $this->_resultSet;
}
@ -55,7 +54,7 @@ class HydratorMockStatement implements \IteratorAggregate, Statement
/**
* {@inheritdoc}
*/
public function fetch($fetchStyle = null)
public function fetch($fetchStyle = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
{
$current = current($this->_resultSet);
next($this->_resultSet);
@ -108,7 +107,7 @@ class HydratorMockStatement implements \IteratorAggregate, Statement
/**
* {@inheritdoc}
*/
public function execute($params = [])
public function execute($params = null)
{
}

View File

@ -34,12 +34,12 @@ class StatementArrayMock extends StatementMock
}
}
public function fetchAll($fetchStyle = null)
public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
{
return $this->_result;
}
public function fetch($fetchStyle = null)
public function fetch($fetchMode = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
{
$current = current($this->_result);
next($this->_result);

View File

@ -75,14 +75,14 @@ class StatementMock implements \IteratorAggregate, Statement
/**
* {@inheritdoc}
*/
public function fetch($fetchStyle = null)
public function fetch($fetchMode = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
{
}
/**
* {@inheritdoc}
*/
public function fetchAll($fetchStyle = null)
public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
{
}