/** * @test */ public function shouldFetchAll() { // Fixture $rows = [(object) ['id' => 1, 'name' => 'Alice']]; $this->pdoBackendMock->method('fetchAll')->will($this->returnValue($rows)); // Test $actual = $this->target->fetchAll(); // Assert $this->assertSame($rows, $actual); }