Esempio n. 1
0
 /**
  * @covers ::getContent
  */
 public function testGetContentNoReponse()
 {
     $this->assertEquals('', $this->object->getContent());
 }
Esempio n. 2
0
File: Parser.php Progetto: n8b/VMN
 /**
  * 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;
 }