Пример #1
0
 protected function prepareFetchObjects(array $data)
 {
     $stmt = $this->createMock(\PDOStatement::class);
     $stmt->method('fetchAll')->willReturn($data);
     $this->driver->method('query')->willReturn($stmt);
     return $this->database->fetchObjectsWithJoin('SELECT column1, column2 FROM `table`', $this->metadata, $this->joinedMetadata);
 }