/** * @covers ::fetch */ public function testFetchWithBoundStyle() { $id = null; $name = null; $active = null; $this->statement->bindColumn('id', $id, PDO::PARAM_INT); $this->statement->bindColumn('name', $name, PDO::PARAM_STR); $this->statement->bindColumn('active', $active, PDO::PARAM_BOOL); $this->assertNull($id); $this->assertNull($name); $this->assertNull($active); $this->callbackReturnValue = $this->getPopulatedCollection(); $this->statement->fetch(PDO::FETCH_BOUND); $this->assertSame(1, $id); $this->assertSame('foo', $name); $this->assertFalse($active); $this->statement->fetch(PDO::FETCH_BOUND); $this->assertSame(2, $id); $this->assertSame('bar', $name); $this->assertTrue($active); }