public function testFetchAllWithFetchObj() { $rows = ['id' => 1, 'foo' => 'bar']; $expectedFetchResult = [(object) ['id' => 1, 'foo' => 'bar']]; $r = new Pseudo\Result([$rows]); $s = new Pseudo\PdoStatement(); $s->setResult($r); $fetchResult = $s->fetchAll(PDO::FETCH_OBJ); $this->assertEquals($expectedFetchResult, $fetchResult); }