Ejemplo n.º 1
0
 /**
  * @dataProvider fetchAllStyleProvider
  * @covers ::fetchAll
  *
  * @param string $fetchStyle
  * @param array  $expected
  */
 public function testFetchAll($fetchStyle, array $expected)
 {
     $this->callbackReturnValue = $this->getPopulatedCollection();
     $this->pdo->expects($this->any())->method('getAttribute')->with(PDO::ATTR_DEFAULT_FETCH_MODE)->will($this->returnValue(PDO::FETCH_BOTH));
     $result = $this->statement->fetchAll($fetchStyle);
     $this->assertEquals($expected, $result);
 }