summaryrefslogtreecommitdiffstats
path: root/Tests/Auth/Yadis/XRDS.php
diff options
context:
space:
mode:
authorLuke Shepard <lshepard@devrs006.snc1.facebook.com>2009-05-27 10:54:14 -0700
committerLuke Shepard <lshepard@devrs006.snc1.facebook.com>2009-05-27 10:54:14 -0700
commitae52c6b3a3b9741c0ef60b6c91ba27af1d85eab7 (patch)
tree450c172565fffe576264e64ea83a9c4978709da9 /Tests/Auth/Yadis/XRDS.php
parent5a96dc7b3fbd600f5acbbf08cf8d2d131aa7f2d3 (diff)
downloadphp-openid-ae52c6b3a3b9741c0ef60b6c91ba27af1d85eab7.zip
php-openid-ae52c6b3a3b9741c0ef60b6c91ba27af1d85eab7.tar.gz
php-openid-ae52c6b3a3b9741c0ef60b6c91ba27af1d85eab7.tar.bz2
[ Upgrading php-openid test framework to use PHPUnit 3.3 ]
Reviewed By: Will Norris The set of tests assumes PHPUnit 2.3, which conflicts with my environment setup. I think PHPUnit 3.3 is pretty widespread now, and under active maintenance (latest rev 4/10/2009). There's a few changes included here. I did a few mostly automated code transformations: replace "PHPUnit_TestCase" "PHPUnit_Framework_TestCase" replace "PHPUnit_TestSuite" "PHPUnit_Framework_TestSuite" removed all require_once "PHPUnit.php" - they are unnecessary. "call by reference" is now deprecated, so changed "&$" to "$" I also made a few changes to admin/testtext.php and Tests/TestDriver.php to accomodate the new syntax. Note that this just upgrades the framework; it does not guarantee that all tests pass. I'll submit future diffs to fix or disable failing unit tests. I wasn't able to get the tests running with the previous version, so I don't know if these have always been failing. I doubt that the github has automatically running unit tests, but if so then we'll have to make sure that the central repo is running the same version of PHPUnit.
Diffstat (limited to 'Tests/Auth/Yadis/XRDS.php')
-rw-r--r--Tests/Auth/Yadis/XRDS.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/Tests/Auth/Yadis/XRDS.php b/Tests/Auth/Yadis/XRDS.php
index 466b207..7d9048e 100644
--- a/Tests/Auth/Yadis/XRDS.php
+++ b/Tests/Auth/Yadis/XRDS.php
@@ -4,13 +4,12 @@
* XRDS-parsing tests for the Yadis library.
*/
-require_once 'PHPUnit.php';
require_once 'Auth/Yadis/XRDS.php';
require_once 'Auth/Yadis/XRIRes.php';
require_once 'Auth/Yadis/XRI.php';
require_once 'Tests/Auth/Yadis/TestUtil.php';
-class Tests_Auth_Yadis_XRDS extends PHPUnit_TestCase {
+class Tests_Auth_Yadis_XRDS extends PHPUnit_Framework_TestCase {
function test_good()
{
@@ -108,7 +107,7 @@ class Tests_Auth_Yadis_XRDS extends PHPUnit_TestCase {
foreach ($canonicalIDtests as $tupl) {
list($iname, $filename, $expectedID) = $tupl;
-
+
$xml = Tests_Auth_Yadis_readdata($filename);
$xrds = Auth_Yadis_XRDS::parseXRDS($xml);
$this->_getCanonicalID($iname, $xrds, $expectedID);
@@ -153,7 +152,7 @@ class Tests_Auth_Yadis_XRDS extends PHPUnit_TestCase {
$types = $s2->getTypes();
$this->assertEquals(count($types), 1, "second type check");
- function _DelegateFilter(&$service)
+ function _DelegateFilter($service)
{
if ($service->getElements('openid:Delegate')) {
return true;
@@ -167,7 +166,7 @@ class Tests_Auth_Yadis_XRDS extends PHPUnit_TestCase {
"_DelegateFilter check");
// This filter should match all services in the document.
- function _HasTypeAndURI(&$service)
+ function _HasTypeAndURI($service)
{
if ($service->getTypes() &&
$service->getURIs()) {
@@ -177,7 +176,7 @@ class Tests_Auth_Yadis_XRDS extends PHPUnit_TestCase {
}
// This filter should only match one.
- function _URIMatchesSchtuff(&$service)
+ function _URIMatchesSchtuff($service)
{
$uris = $service->getURIs();
@@ -190,7 +189,7 @@ class Tests_Auth_Yadis_XRDS extends PHPUnit_TestCase {
}
// This filter should only match one.
- function _URIMatchesMyOpenID(&$service)
+ function _URIMatchesMyOpenID($service)
{
$uris = $service->getURIs();