Пример #1
0
 /**
  * Retrieve an array of Employee objects according to a search query.
  *
  * @param array $query The query.
  * @return Employee[]
  */
 public static function find(array $query)
 {
     $employees = Client::get("employee", $query);
     return array_map(function ($data) {
         return new self($data);
     }, $employees);
 }
Пример #2
0
 /** @expectedException DsvSu\Daisy\ServerException */
 public function testGetError()
 {
     $this->mock->append(new Response(500));
     Client::get('foo/bar', ['a' => 'b', 'c' => 3]);
 }