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); } }
public function testHeaders() { Request::addHeader('DEMO', 1); $headers = Request::getHeaders(); $this->assertEquals($headers['DEMO'], 1); }