fetchAll() public method

Returns an array containing all of the result set rows.
public fetchAll ( integer | null $fetchMode = null, mixed $fetchArgument ) : array
$fetchMode integer | null
$fetchArgument mixed
return array An array containing all of the remaining rows in the result set.
 /**
  * @param \Doctrine\DBAL\Connection $connection
  * @param \Doctrine\DBAL\Statement $stmt
  */
 function it_get_keys($connection, $stmt)
 {
     $stmt->fetchAll(\PDO::FETCH_COLUMN)->willReturn(array('filename', 'filename1', 'filename2'));
     $connection->quoteIdentifier(Argument::any())->will(function ($argument) {
         return sprintf('"%s"', $argument[0]);
     });
     $connection->executeQuery('SELECT "key" FROM "someTableName"')->willReturn($stmt);
     $this->keys()->shouldReturn(array('filename', 'filename1', 'filename2'));
 }
 /**
  * @param null $fetchMode
  * @param int $fetchArgument
  * @return mixed
  */
 public function fetchAll($fetchMode = null, $fetchArgument = 0)
 {
     return $this->stmt->fetchAll($fetchMode, $fetchArgument);
 }