Example #1
0
 public function testGetContent404()
 {
     try {
         $Request = new Request(static::$_url404);
         $Request->send();
         $Request->saveToFile('/upload/obx.core/test/Request/404/some_404_file.json');
     } catch (RequestError $e) {
         $this->assertEquals(RequestError::E_FILE_SAVE_NO_RESPONSE, $e->getCode());
         $this->assertEquals(RequestError::getLangMessage(RequestError::E_FILE_SAVE_NO_RESPONSE), $e->getMessage());
     }
     $this->assertEquals('404', $Request->getStatus());
     $this->assertFileNotExists(self::$_docRoot . '/upload/obx.core/test/Request/404/some_404_file.json');
 }