public function testOpenidWrapperDiscoverYadisUrlNonexistent() { $credentials = new ezcAuthenticationIdCredentials(self::$urlNonexistent); $filter = new ezcAuthenticationOpenidWrapper(); try { $result = $filter->discoverYadis(self::$urlNonexistent); $this->fail("Expected exception was not thrown."); } catch (ezcAuthenticationOpenidException $e) { $expected = "Could not connect to http://xxx. Type 'application/xrds+xml' not supported."; $this->assertEquals($expected, $e->getMessage()); } }
public function testOpenidWrapperDiscoverYadisUrlNonexistent() { $credentials = new ezcAuthenticationIdCredentials(self::$urlNonexistent); $filter = new ezcAuthenticationOpenidWrapper(); try { $result = $filter->discoverYadis(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))); } }