예제 #1
0
 public function testOpenidWrapperDiscoverHtmlUrlNonexistent()
 {
     $credentials = new ezcAuthenticationIdCredentials(self::$urlNonexistent);
     $filter = new ezcAuthenticationOpenidWrapper();
     try {
         $result = $filter->discoverHtml(self::$urlNonexistent);
         $this->fail("Expected exception was not thrown.");
     } catch (ezcAuthenticationOpenidException $e) {
         $expected = "Could not connect to http://xxx. Type 'text/html' not supported.";
         $this->assertEquals($expected, $e->getMessage());
     }
 }
예제 #2
0
 public function testOpenidWrapperDiscoverHtmlUrlNonexistent()
 {
     $credentials = new ezcAuthenticationIdCredentials(self::$urlNonexistent);
     $filter = new ezcAuthenticationOpenidWrapper();
     try {
         $result = $filter->discoverHtml(self::$urlNonexistent);
         $this->fail("Expected exception was not thrown.");
     } catch (ezcAuthenticationOpenidException $e) {
         $expected = "Could not connect to host xxx:80:";
         $this->assertEquals($expected, substr($e->getMessage(), 0, strlen($expected)));
     }
 }