Esempio n. 1
0
 public function testExceptionsThrown()
 {
     $url = new Ergo_Http_Url('/');
     try {
         $url->getScheme();
         $this->fail('getScheme() should throw exception');
     } catch (Ergo_Http_UrlException $e) {
         $this->pass('getScheme() should throw exception');
     }
     try {
         $url->getHost();
         $this->fail('getHost() should throw exception');
     } catch (Ergo_Http_UrlException $e) {
         $this->pass('getHost() should throw exception');
     }
 }