diff options
author | Kevin Turner <kevin@janrain.com> | 2007-09-10 23:03:41 +0000 |
---|---|---|
committer | Kevin Turner <kevin@janrain.com> | 2007-09-10 23:03:41 +0000 |
commit | e19d4dd7ae18418f084bd9f76d1ce76730696491 (patch) | |
tree | b8eceb0000c42e1880b24dbccee8120534af8156 /Tests/Auth | |
parent | 907ee6c24137b2100e704d91b4bd4b65c68b823f (diff) | |
download | php-openid-e19d4dd7ae18418f084bd9f76d1ce76730696491.zip php-openid-e19d4dd7ae18418f084bd9f76d1ce76730696491.tar.gz php-openid-e19d4dd7ae18418f084bd9f76d1ce76730696491.tar.bz2 |
[project @ Tests_Auth_Yadis_Yadis: fetch manifest.txt from the network. Fixes #23.]
Everything that uses manifest.txt relies on the network, so this isn't
adding significantly more network overhead, and it lets us update it easier.
Diffstat (limited to 'Tests/Auth')
-rw-r--r-- | Tests/Auth/Yadis/Yadis.php | 4 | ||||
-rw-r--r-- | Tests/Auth/Yadis/data/manifest.txt | 30 |
2 files changed, 2 insertions, 32 deletions
diff --git a/Tests/Auth/Yadis/Yadis.php b/Tests/Auth/Yadis/Yadis.php index 4e45b07..837e447 100644 --- a/Tests/Auth/Yadis/Yadis.php +++ b/Tests/Auth/Yadis/Yadis.php @@ -32,7 +32,7 @@ class Tests_Auth_Yadis_DiscoveryTest extends PHPUnit_TestCase { $this->assertTrue($y !== null); // Compare parts of returned Yadis object to expected URLs. - $this->assertEquals($this->redir_uri, $y->normalized_uri); + $this->assertEquals($this->redir_uri, $y->normalized_uri, "tried $this->input_url"); if ($this->xrds_uri) { $this->assertEquals($this->xrds_uri, $y->xrds_uri); @@ -71,7 +71,7 @@ class Tests_Auth_Yadis_Yadis extends PHPUnit_TestSuite { function Tests_Auth_Yadis_Yadis() { - $test_data = Tests_Auth_Yadis_readdata('manifest.txt'); + $test_data = file_get_contents('http://www.openidenabled.com/resources/yadis-test/discover/manifest.txt'); $test_cases = $this->parseTests($test_data); diff --git a/Tests/Auth/Yadis/data/manifest.txt b/Tests/Auth/Yadis/data/manifest.txt deleted file mode 100644 index 2f05d5e..0000000 --- a/Tests/Auth/Yadis/data/manifest.txt +++ /dev/null @@ -1,30 +0,0 @@ -# This file contains test cases for doing YADIS identity URL and -# service discovery. For each case, there are three URLs. The first -# URL is the user input. The second is the identity URL and the third -# is the URL from which the XRDS document should be read. -# -# The file format is as follows: -# User URL <tab> Identity URL <tab> XRDS URL <newline> -# -# blank lines and lines starting with # should be ignored. -# -# To use this test: -# -# 1. Run your discovery routine on the User URL. -# -# 2. Compare the identity URL returned by the discovery routine to the -# identity URL on that line of the file. It must be an EXACT match. -# -# 3. Do a regular HTTP GET on the XRDS URL. Compare the content that -# was returned by your discovery routine with the content returned -# from that URL. It should also be an exact match. - -http://www.openidenabled.com/resources/yadis-test/discover/equiv http://www.openidenabled.com/resources/yadis-test/discover/equiv http://www.openidenabled.com/resources/yadis-test/discover/xrds -http://www.openidenabled.com/resources/yadis-test/discover/header http://www.openidenabled.com/resources/yadis-test/discover/header http://www.openidenabled.com/resources/yadis-test/discover/xrds -http://www.openidenabled.com/resources/yadis-test/discover/xrds http://www.openidenabled.com/resources/yadis-test/discover/xrds http://www.openidenabled.com/resources/yadis-test/discover/xrds -http://www.openidenabled.com/resources/yadis-test/discover/xrds_html http://www.openidenabled.com/resources/yadis-test/discover/xrds_html -http://www.openidenabled.com/resources/yadis-test/discover/redir_equiv http://www.openidenabled.com/resources/yadis-test/discover/equiv http://www.openidenabled.com/resources/yadis-test/discover/xrds -http://www.openidenabled.com/resources/yadis-test/discover/redir_header http://www.openidenabled.com/resources/yadis-test/discover/header http://www.openidenabled.com/resources/yadis-test/discover/xrds -http://www.openidenabled.com/resources/yadis-test/discover/redir_xrds http://www.openidenabled.com/resources/yadis-test/discover/xrds http://www.openidenabled.com/resources/yadis-test/discover/xrds -http://www.openidenabled.com/resources/yadis-test/discover/redir_xrds_html http://www.openidenabled.com/resources/yadis-test/discover/xrds_html -http://www.openidenabled.com/resources/yadis-test/discover/redir_redir_equiv http://www.openidenabled.com/resources/yadis-test/discover/equiv http://www.openidenabled.com/resources/yadis-test/discover/xrds |