Skip to content

Commit

Permalink
Merge pull request #7076 from lcobucci/fix-build
Browse files Browse the repository at this point in the history
Make mocks compatible with latest version of interface
  • Loading branch information
lcobucci committed Feb 17, 2018
2 parents 09266d5 + 9f7df92 commit ec265bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/Doctrine/Tests/Mocks/HydratorMockStatement.php
Expand Up @@ -37,7 +37,7 @@ public function __construct(array $resultSet)
* @param array|null $ctorArgs
* @return array
*/
public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
public function fetchAll($fetchMode = null, ...$args)
{
return $this->resultSet;
}
Expand All @@ -58,7 +58,7 @@ public function fetchColumn($columnNumber = 0)
/**
* {@inheritdoc}
*/
public function fetch($fetchStyle = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
public function fetch($fetchMode = null, ...$args)
{
$current = current($this->resultSet);
next($this->resultSet);
Expand Down Expand Up @@ -133,7 +133,7 @@ public function getIterator()
/**
* {@inheritdoc}
*/
public function setFetchMode($fetchStyle, $arg2 = null, $arg3 = null)
public function setFetchMode($fetchMode, ...$args)
{
}
}
4 changes: 2 additions & 2 deletions tests/Doctrine/Tests/Mocks/StatementArrayMock.php
Expand Up @@ -35,12 +35,12 @@ public function columnCount()
return 0;
}

public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
public function fetchAll($fetchMode = null, ...$args)
{
return $this->result;
}

public function fetch($fetchMode = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
public function fetch($fetchMode = null, ...$args)
{
$current = current($this->result);
next($this->result);
Expand Down
6 changes: 3 additions & 3 deletions tests/Doctrine/Tests/Mocks/StatementMock.php
Expand Up @@ -70,21 +70,21 @@ public function columnCount()
/**
* {@inheritdoc}
*/
public function setFetchMode($fetchStyle, $arg2 = null, $arg3 = null)
public function setFetchMode($fetchMode, ...$args)
{
}

/**
* {@inheritdoc}
*/
public function fetch($fetchMode = null, $cursorOrientation = \PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
public function fetch($fetchMode = null, ...$args)
{
}

/**
* {@inheritdoc}
*/
public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
public function fetchAll($fetchMode = null, ...$args)
{
}

Expand Down

0 comments on commit ec265bf

Please sign in to comment.