Esempio n. 1
0
 public function test___construct04()
 {
     $url = "http://example.com";
     $response = array('http_code' => 403, 'content_type' => 'text/plain');
     $content = "<error>You have no rights to read user.</error>";
     $e = new YouTrackException($url, $response, $content);
     $this->assertEquals("Error for 'http://example.com': 403: You have no rights to read user.", $e->getMessage());
 }
Esempio n. 2
0
 public function test___construct03()
 {
     $url = "http://example.com";
     $response = array('http_code' => 500, 'content_type' => 'text/html; charset=utf8');
     $content = "";
     $e = new Exception($url, $response, $content);
     $this->assertEquals("Error for 'http://example.com': 500", $e->getMessage());
 }