/** * @covers ::getContent */ public function testGetContentNoReponse() { $this->assertEquals('', $this->object->getContent()); }
/** * Parse JSON from the URL * * @param string $endpoint Endpoint * @param boolean $as_array Decode as array * @return boolean */ protected function parseJson($endpoint = '', $as_array = true) { $handler = new UrlHandler($endpoint); $json = $handler->getContent($endpoint); if ($json) { return json_decode($json, $as_array); } return false; }