예제 #1
0
 protected function request($method, $relativeUrl, $data = null)
 {
     $request = new Request();
     $response = $request->request($method, $relativeUrl, $data);
     if (isset($response['entity']) and $response['entity'] == $this->getEntity()) {
         $this->fill($response);
         return $this;
     } else {
         return static::buildEntity($response);
     }
 }
예제 #2
0
 public function testHeaders()
 {
     Request::addHeader('DEMO', 1);
     $headers = Request::getHeaders();
     $this->assertEquals($headers['DEMO'], 1);
 }