Commit 46746cd8 by Paul Klimov

OpenId client 'discover()' method refactored.

parent 5a137e6d
...@@ -44,4 +44,17 @@ class OpenIdTest extends TestCase ...@@ -44,4 +44,17 @@ class OpenIdTest extends TestCase
$this->assertNotEmpty($client->getTrustRoot(), 'Unable to get default trust root!'); $this->assertNotEmpty($client->getTrustRoot(), 'Unable to get default trust root!');
$this->assertNotEmpty($client->getReturnUrl(), 'Unable to get default return URL!'); $this->assertNotEmpty($client->getReturnUrl(), 'Unable to get default return URL!');
} }
public function testDiscover()
{
$url = 'https://www.google.com/accounts/o8/id';
$client = new OpenId();
$info = $client->discover($url);
$this->assertNotEmpty($info);
$this->assertNotEmpty($info['url']);
$this->assertEquals(2, $info['version']);
$this->assertArrayHasKey('identifierSelect', $info);
$this->assertArrayHasKey('ax', $info);
$this->assertArrayHasKey('sreg', $info);
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment