summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorOleksandr Zahorulia <Hast4656@gmail.com>2016-09-30 22:50:50 +0300
committerMarco Ceppi <marco@ceppi.net>2016-09-30 21:50:50 +0200
commitd8ef0dba1fa378fc22fe6d423f9423febb2d996d (patch)
tree125e225306ac315f85f6f950e6e1ac1e72f804d8 /Tests
parent924f9aa42453cd0f9dba72587b4e2cdf7f4de874 (diff)
downloadphp-openid-d8ef0dba1fa378fc22fe6d423f9423febb2d996d.zip
php-openid-d8ef0dba1fa378fc22fe6d423f9423febb2d996d.tar.gz
php-openid-d8ef0dba1fa378fc22fe6d423f9423febb2d996d.tar.bz2
#130: PHP 7 compatibility (fixes #129)HEADorigin/masterorigin/HEADmaster
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Auth/OpenID/AX.php4
-rw-r--r--Tests/Auth/OpenID/AssociationResponse.php2
-rw-r--r--Tests/Auth/OpenID/AuthRequest.php2
-rw-r--r--Tests/Auth/OpenID/BigMath.php12
-rw-r--r--Tests/Auth/OpenID/Consumer.php16
-rw-r--r--Tests/Auth/OpenID/DiffieHellman.php8
-rw-r--r--Tests/Auth/OpenID/Discover_OpenID.php18
-rw-r--r--Tests/Auth/OpenID/HMAC.php4
-rw-r--r--Tests/Auth/OpenID/KVForm.php6
-rw-r--r--Tests/Auth/OpenID/MemStore.php4
-rw-r--r--Tests/Auth/OpenID/Negotiation.php2
-rw-r--r--Tests/Auth/OpenID/Nonce.php6
-rw-r--r--Tests/Auth/OpenID/OpenID_Yadis.php4
-rw-r--r--Tests/Auth/OpenID/PAPE.php4
-rw-r--r--Tests/Auth/OpenID/Parse.php6
-rw-r--r--Tests/Auth/OpenID/RPVerify.php6
-rw-r--r--Tests/Auth/OpenID/SReg.php10
-rw-r--r--Tests/Auth/OpenID/Server.php6
-rw-r--r--Tests/Auth/OpenID/StoreTest.php4
-rw-r--r--Tests/Auth/OpenID/TrustRoot.php6
-rw-r--r--Tests/Auth/OpenID/URINorm.php4
-rw-r--r--Tests/Auth/OpenID/VerifyDisco.php2
-rw-r--r--Tests/Auth/Yadis/Discover_Yadis.php8
-rw-r--r--Tests/Auth/Yadis/ParseHTML.php4
-rw-r--r--Tests/Auth/Yadis/XRI.php2
-rw-r--r--Tests/Auth/Yadis/Yadis.php5
26 files changed, 81 insertions, 74 deletions
diff --git a/Tests/Auth/OpenID/AX.php b/Tests/Auth/OpenID/AX.php
index 0a85ed2..af1f6e9 100644
--- a/Tests/Auth/OpenID/AX.php
+++ b/Tests/Auth/OpenID/AX.php
@@ -517,7 +517,7 @@ class FetchRequestTest extends PHPUnit_Framework_TestCase {
}
class FauxEndpoint {
- function FauxEndpoint() {
+ function __construct() {
$this->claimed_id = 'http://some.url/';
}
}
@@ -777,7 +777,7 @@ class Tests_Auth_OpenID_AX extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_OpenID_AX";
}
- function Tests_Auth_OpenID_AX()
+ function __construct()
{
$this->addTestSuite('StoreResponseTest');
$this->addTestSuite('StoreRequestTest');
diff --git a/Tests/Auth/OpenID/AssociationResponse.php b/Tests/Auth/OpenID/AssociationResponse.php
index 6902f95..9b78dca 100644
--- a/Tests/Auth/OpenID/AssociationResponse.php
+++ b/Tests/Auth/OpenID/AssociationResponse.php
@@ -118,7 +118,7 @@ class TestExtractAssociationMissingFieldsOpenID1 extends Tests_Auth_OpenID_Assoc
}
class DummyAssocationSession {
- function DummyAssocationSession($session_type, $allowed_assoc_types=array())
+ function __construct($session_type, $allowed_assoc_types=array())
{
$this->session_type = $session_type;
$this->allowed_assoc_types = $allowed_assoc_types;
diff --git a/Tests/Auth/OpenID/AuthRequest.php b/Tests/Auth/OpenID/AuthRequest.php
index 02ab75d..22cdd74 100644
--- a/Tests/Auth/OpenID/AuthRequest.php
+++ b/Tests/Auth/OpenID/AuthRequest.php
@@ -288,7 +288,7 @@ class Tests_Auth_OpenID_AuthRequest extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_OpenID_AuthRequest";
}
- function Tests_Auth_OpenID_AuthRequest()
+ function __construct()
{
$this->addTestSuite('TestAuthRequestOpenID1');
$this->addTestSuite('TestAuthRequestOpenID1Immediate');
diff --git a/Tests/Auth/OpenID/BigMath.php b/Tests/Auth/OpenID/BigMath.php
index acab4d9..40c627e 100644
--- a/Tests/Auth/OpenID/BigMath.php
+++ b/Tests/Auth/OpenID/BigMath.php
@@ -20,7 +20,7 @@ class Tests_Auth_OpenID_BinLongConvertRnd extends PHPUnit_Framework_TestCase {
var $lib;
var $max;
- function Tests_Auth_OpenID_BinLongConvertRnd($lib, $max)
+ function __construct($lib, $max)
{
$this->lib =& $lib;
$this->max = $max;
@@ -45,7 +45,7 @@ class Tests_Auth_OpenID_BinLongConvert extends PHPUnit_Framework_TestCase {
var $bin;
var $lng;
- function Tests_Auth_OpenID_BinLongConvert($lib, $bin, $lng)
+ function __construct($lib, $bin, $lng)
{
$this->lib =& $lib;
$this->bin = $bin;
@@ -66,7 +66,7 @@ class Tests_Auth_OpenID_Base64ToLong extends PHPUnit_Framework_TestCase {
var $b64;
var $lib;
- function Tests_Auth_OpenID_Base64ToLong($lib, $b64, $num)
+ function __construct($lib, $b64, $num)
{
$this->lib = $lib;
$this->b64 = $b64;
@@ -81,7 +81,7 @@ class Tests_Auth_OpenID_Base64ToLong extends PHPUnit_Framework_TestCase {
}
class Tests_Auth_OpenID_LongToBase64 extends Tests_Auth_OpenID_Base64ToLong {
- function Tests_Auth_OpenID_LongToBase64($lib, $b64, $num)
+ function __construct($lib, $b64, $num)
{
$this->lib = $lib;
$this->b64 = $b64;
@@ -96,7 +96,7 @@ class Tests_Auth_OpenID_LongToBase64 extends Tests_Auth_OpenID_Base64ToLong {
}
class Tests_Auth_OpenID_Rand extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_Rand($lib)
+ function __construct($lib)
{
$this->lib =& $lib;
}
@@ -216,7 +216,7 @@ class Tests_Auth_OpenID_BigMath extends PHPUnit_Framework_TestSuite {
}
- function Tests_Auth_OpenID_BigMath($name)
+ function __construct($name)
{
$this->setName($name);
diff --git a/Tests/Auth/OpenID/Consumer.php b/Tests/Auth/OpenID/Consumer.php
index 761f9f2..bf9804c 100644
--- a/Tests/Auth/OpenID/Consumer.php
+++ b/Tests/Auth/OpenID/Consumer.php
@@ -41,7 +41,7 @@ function mkSuccess($endpoint, $q)
}
class FastConsumerSession extends Auth_OpenID_DiffieHellmanSHA1ConsumerSession {
- function FastConsumerSession($dh = null)
+ function __construct($dh = null)
{
if ($dh === null) {
$dh = new Auth_OpenID_DiffieHellman(100389557, 2);
@@ -108,7 +108,7 @@ function Auth_OpenID_associate($qs, $assoc_secret, $assoc_handle)
}
class Auth_OpenID_TestFetcher extends Auth_Yadis_HTTPFetcher {
- function Auth_OpenID_TestFetcher($user_url, $user_page,
+ function __construct($user_url, $user_page,
$assoc_secret, $assoc_handle)
{
$this->get_responses = array($user_url =>
@@ -992,7 +992,7 @@ class Tests_Auth_OpenID_Consumer_TestCheckAuthTriggered extends _TestIdRes {
}
class _MockFetcher {
- function _MockFetcher($response = null)
+ function __construct($response = null)
{
// response is (code, url, body)
$this->response = $response;
@@ -1519,6 +1519,9 @@ class _BadArgCheckingConsumer extends Auth_OpenID_GenericConsumer {
}
class Tests_Auth_OpenID_Consumer_TestCheckAuth extends _TestIdRes {
+ public $fetcher;
+ public $consumer;
+
function setUp()
{
$this->store = new Tests_Auth_OpenID_MemStore();
@@ -1608,6 +1611,8 @@ class Tests_Auth_OpenID_Consumer_TestCheckAuth extends _TestIdRes {
}
class Tests_Auth_OpenID_Consumer_TestFetchAssoc extends PHPUnit_Framework_TestCase {
+ public $fetcher;
+ public $consumer;
function setUp()
{
$this->store = new Tests_Auth_OpenID_MemStore();
@@ -1781,7 +1786,7 @@ class Tests_Auth_OpenID_SuccessResponse extends PHPUnit_Framework_TestCase {
}
class _StubConsumer {
- function _StubConsumer()
+ function __construct()
{
$this->assoc = null;
$this->response = null;
@@ -2069,6 +2074,9 @@ class IDPDrivenTest_Consumer2 extends ConfigurableConsumer {
}
class IDPDrivenTest extends PHPUnit_Framework_TestCase {
+ public $consumer;
+ public $endpoint;
+
function setUp()
{
$this->store = new GoodAssocStore();
diff --git a/Tests/Auth/OpenID/DiffieHellman.php b/Tests/Auth/OpenID/DiffieHellman.php
index 524c011..f2d7679 100644
--- a/Tests/Auth/OpenID/DiffieHellman.php
+++ b/Tests/Auth/OpenID/DiffieHellman.php
@@ -18,7 +18,7 @@ require_once 'Auth/OpenID/DiffieHellman.php';
require_once 'Tests/Auth/OpenID/TestUtil.php';
class Tests_Auth_OpenID_DiffieHellman_CheckCases extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_DiffieHellman_CheckCases($cases, $n)
+ function __construct($cases, $n)
{
$this->cases = $cases;
$this->n = $n;
@@ -31,7 +31,7 @@ class Tests_Auth_OpenID_DiffieHellman_CheckCases extends PHPUnit_Framework_TestC
}
class Tests_Auth_OpenID_DiffieHellman_Private extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_DiffieHellman_Private($name, $input, $expected)
+ function __construct($name, $input, $expected)
{
$this->setName("$name");
$this->input = $input;
@@ -47,7 +47,7 @@ class Tests_Auth_OpenID_DiffieHellman_Private extends PHPUnit_Framework_TestCase
}
class Tests_Auth_OpenID_DiffieHellman_Exch extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_DiffieHellman_Exch($name, $p1, $p2, $shared)
+ function __construct($name, $p1, $p2, $shared)
{
$this->setName("$name");
$this->p1 = $p1;
@@ -114,7 +114,7 @@ class Tests_Auth_OpenID_DiffieHellman extends PHPUnit_Framework_TestSuite {
return $cases;
}
- function Tests_Auth_OpenID_DiffieHellman($name)
+ function __construct($name)
{
$this->setName($name);
diff --git a/Tests/Auth/OpenID/Discover_OpenID.php b/Tests/Auth/OpenID/Discover_OpenID.php
index 740548d..0b8b973 100644
--- a/Tests/Auth/OpenID/Discover_OpenID.php
+++ b/Tests/Auth/OpenID/Discover_OpenID.php
@@ -13,7 +13,7 @@ require_once 'Auth/Yadis/XRI.php';
*/
class _SimpleMockFetcher {
- function _SimpleMockFetcher($responses)
+ function __construct($responses)
{
$this->responses = $responses;
}
@@ -60,7 +60,7 @@ class Tests_Auth_OpenID_ServiceEndpoint extends PHPUnit_Framework_TestCase {
class Tests_Auth_OpenID_DiscoveryFailure extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_DiscoveryFailure($responses)
+ function __construct($responses)
{
// Response is ($code, $url, $body).
$this->cases = array(
@@ -97,7 +97,7 @@ class Tests_Auth_OpenID_DiscoveryFailure extends PHPUnit_Framework_TestCase {
class _ErrorRaisingFetcher {
// Just raise an exception when fetch is called
- function _ErrorRaisingFetcher($thing_to_raise)
+ function __construct($thing_to_raise)
{
$this->thing_to_raise = $thing_to_raise;
}
@@ -123,7 +123,7 @@ class Tests_Auth_OpenID_Discover_FetchException extends PHPUnit_Framework_TestCa
// Make sure exceptions get passed through discover function from
// fetcher.
- function Tests_Auth_OpenID_Discover_FetchException($exc)
+ function __construct($exc)
{
$this->cases = array(E_AUTH_OPENID_EXCEPTION,
E_AUTH_OPENID_DIDFETCH,
@@ -151,7 +151,7 @@ class Tests_Auth_OpenID_Discover_FetchException extends PHPUnit_Framework_TestCa
// Tests for openid.consumer.discover.discover
class _DiscoveryMockFetcher extends Auth_Yadis_HTTPFetcher {
- function _DiscoveryMockFetcher($documents)
+ function __construct($documents)
{
$this->redirect = null;
$this->documents = $documents;
@@ -536,7 +536,7 @@ class Tests_Auth_OpenID_Discover_OpenID extends _DiscoveryBase {
class _MockFetcherForXRIProxy extends Auth_Yadis_HTTPFetcher {
- function _MockFetcherForXRIProxy($documents)
+ function __construct($documents)
{
$this->documents = $documents;
$this->fetchlog = array();
@@ -634,7 +634,7 @@ class TestXRIDiscovery extends _DiscoveryBase {
}
class Tests_Auth_OpenID_DiscoverSession {
- function Tests_Auth_OpenID_DiscoverSession()
+ function __construct()
{
$this->data = array();
}
@@ -686,10 +686,10 @@ class _FetcherWithoutSSL extends _DiscoveryMockFetcher {
class _NonFetcher extends _DiscoveryMockFetcher {
var $used = false;
- function _NonFetcher()
+ function __construct()
{
$a = array();
- parent::_DiscoveryMockFetcher($a);
+ parent::__construct($a);
}
function supportsSSL()
diff --git a/Tests/Auth/OpenID/HMAC.php b/Tests/Auth/OpenID/HMAC.php
index 7423966..676462c 100644
--- a/Tests/Auth/OpenID/HMAC.php
+++ b/Tests/Auth/OpenID/HMAC.php
@@ -18,7 +18,7 @@ require_once 'Auth/OpenID/HMAC.php';
require_once 'Tests/Auth/OpenID/TestUtil.php';
class Tests_Auth_OpenID_HMAC_TestCase extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_HMAC_TestCase(
+ function __construct(
$name, $key, $data, $expected, $hmac_func)
{
@@ -131,7 +131,7 @@ class Tests_Auth_OpenID_HMAC extends PHPUnit_Framework_TestSuite {
return $final;
}
- function Tests_Auth_OpenID_HMAC($name)
+ function __construct($name)
{
$this->setName($name);
$hash_test_defs = array(array(
diff --git a/Tests/Auth/OpenID/KVForm.php b/Tests/Auth/OpenID/KVForm.php
index 904f2c8..6b25221 100644
--- a/Tests/Auth/OpenID/KVForm.php
+++ b/Tests/Auth/OpenID/KVForm.php
@@ -55,7 +55,7 @@ class Tests_Auth_OpenID_KVForm_TestCase extends PHPUnit_Framework_TestCase {
class Tests_Auth_OpenID_KVForm_TestCase_Parse
extends Tests_Auth_OpenID_KVForm_TestCase {
- function Tests_Auth_OpenID_KVForm_TestCase_Parse(
+ function __construct(
$arr, $str, $lossy, $errs)
{
@@ -97,7 +97,7 @@ extends Tests_Auth_OpenID_KVForm_TestCase {
class Tests_Auth_OpenID_KVForm_TestCase_Null
extends Tests_Auth_OpenID_KVForm_TestCase {
- function Tests_Auth_OpenID_KVForm_TestCase_Null($arr, $errs)
+ function __construct($arr, $errs)
{
$this->arr = $arr;
$this->errs = $errs;
@@ -112,7 +112,7 @@ extends Tests_Auth_OpenID_KVForm_TestCase {
}
class Tests_Auth_OpenID_KVForm extends PHPUnit_Framework_TestSuite {
- function Tests_Auth_OpenID_KVForm($name)
+ function __construct($name)
{
$this->setName($name);
$testdata_list = array(
diff --git a/Tests/Auth/OpenID/MemStore.php b/Tests/Auth/OpenID/MemStore.php
index 7724719..bdeb8f7 100644
--- a/Tests/Auth/OpenID/MemStore.php
+++ b/Tests/Auth/OpenID/MemStore.php
@@ -7,7 +7,7 @@ require_once "Auth/OpenID/Interface.php";
require_once 'Auth/OpenID/Nonce.php';
class ServerAssocs {
- function ServerAssocs()
+ function __construct()
{
$this->assocs = array();
}
@@ -76,7 +76,7 @@ class ServerAssocs {
* Use for single long-running processes. No persistence supplied.
*/
class Tests_Auth_OpenID_MemStore extends Auth_OpenID_OpenIDStore {
- function Tests_Auth_OpenID_MemStore()
+ function __construct()
{
$this->server_assocs = array();
$this->nonces = array();
diff --git a/Tests/Auth/OpenID/Negotiation.php b/Tests/Auth/OpenID/Negotiation.php
index 02628fc..4fe8c84 100644
--- a/Tests/Auth/OpenID/Negotiation.php
+++ b/Tests/Auth/OpenID/Negotiation.php
@@ -336,7 +336,7 @@ class Tests_Auth_OpenID_Negotiation extends PHPUnit_Framework_TestSuite {
return 'Tests_Auth_OpenID_Negotiation';
}
- function Tests_Auth_OpenID_Negotiation()
+ function __construct()
{
$this->addTestSuite('TestNegotiatorBehaviors');
$this->addTestSuite('TestOpenID1SessionNegotiation');
diff --git a/Tests/Auth/OpenID/Nonce.php b/Tests/Auth/OpenID/Nonce.php
index 1f64948..9d51b66 100644
--- a/Tests/Auth/OpenID/Nonce.php
+++ b/Tests/Auth/OpenID/Nonce.php
@@ -19,7 +19,7 @@ define('Tests_Auth_OpenID_nonce_re',
'/\A\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ/');
class Tests_Auth_OpenID_Nonce extends PHPUnit_Framework_TestSuite {
- function Tests_Auth_OpenID_Nonce()
+ function __construct()
{
$this->addTestSuite('Tests_Auth_OpenID_NonceTests');
$this->makeSplitTests();
@@ -95,7 +95,7 @@ class Tests_Auth_OpenID_Nonce extends PHPUnit_Framework_TestSuite {
}
class Tests_Auth_OpenID_Nonce_TimestampCase extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_Nonce_TimestampCase(
+ function __construct(
$nonce_str, $skew, $now, $expected)
{
$this->nonce_string = $nonce_str;
@@ -151,7 +151,7 @@ class Tests_Auth_OpenID_NonceTests extends PHPUnit_Framework_TestCase {
}
class Tests_Auth_OpenID_Nonce_BadSplitCase extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_Nonce_BadSplitCase($nonce_str)
+ function __construct($nonce_str)
{
$this->nonce_str = $nonce_str;
}
diff --git a/Tests/Auth/OpenID/OpenID_Yadis.php b/Tests/Auth/OpenID/OpenID_Yadis.php
index f013d96..b92967a 100644
--- a/Tests/Auth/OpenID/OpenID_Yadis.php
+++ b/Tests/Auth/OpenID/OpenID_Yadis.php
@@ -141,7 +141,7 @@ function __subsets($list)
}
class Tests_Auth_OpenID_Tester extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_Tester($uris, $type_uris, $delegate)
+ function __construct($uris, $type_uris, $delegate)
{
parent::__construct();
$this->uris = $uris;
@@ -211,7 +211,7 @@ class Tests_Auth_OpenID_Tester extends PHPUnit_Framework_TestCase {
}
class Tests_Auth_OpenID_OpenID_Yadis extends PHPUnit_Framework_TestSuite {
- function Tests_Auth_OpenID_OpenID_Yadis()
+ function __construct()
{
global $__data;
foreach ($__data as $case) {
diff --git a/Tests/Auth/OpenID/PAPE.php b/Tests/Auth/OpenID/PAPE.php
index d71036d..174ee66 100644
--- a/Tests/Auth/OpenID/PAPE.php
+++ b/Tests/Auth/OpenID/PAPE.php
@@ -93,7 +93,7 @@ class PapeRequestTestCase extends PHPUnit_Framework_TestCase {
}
class PAPE_DummySuccessResponse {
- function PAPE_DummySuccessResponse($message, $signed_stuff)
+ function __construct($message, $signed_stuff)
{
$this->message = $message;
$this->signed_stuff = $signed_stuff;
@@ -235,7 +235,7 @@ class Tests_Auth_OpenID_PAPE extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_OpenID_PAPE";
}
- function Tests_Auth_OpenID_PAPE() {
+ function __construct() {
$this->addTestSuite('PapeRequestTestCase');
$this->addTestSuite('PapeResponseTestCase');
}
diff --git a/Tests/Auth/OpenID/Parse.php b/Tests/Auth/OpenID/Parse.php
index b0e0350..afb1e9d 100644
--- a/Tests/Auth/OpenID/Parse.php
+++ b/Tests/Auth/OpenID/Parse.php
@@ -17,7 +17,7 @@ require_once 'Tests/Auth/OpenID/TestUtil.php';
require_once 'Auth/OpenID/Parse.php';
class Tests_Auth_OpenID_Link extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_Link($case)
+ function __construct($case)
{
list($desc, $markup, $links, $case_text) = $case;
$this->desc = $desc;
@@ -85,7 +85,7 @@ class Tests_Auth_OpenID_Link extends PHPUnit_Framework_TestCase {
}
class NumTestCases extends PHPUnit_Framework_TestCase {
- function NumTestCases($test_cases, $num_tests)
+ function __construct($test_cases, $num_tests)
{
$this->test_cases = $test_cases;
$this->num_tests = $num_tests;
@@ -168,7 +168,7 @@ class Tests_Auth_OpenID_Parse extends PHPUnit_Framework_TestSuite {
return array($num_tests, $tests);
}
- function Tests_Auth_OpenID_Parse()
+ function __construct()
{
$test_data = Tests_Auth_OpenID_readdata('linkparse.txt');
diff --git a/Tests/Auth/OpenID/RPVerify.php b/Tests/Auth/OpenID/RPVerify.php
index 1482af4..50b2d93 100644
--- a/Tests/Auth/OpenID/RPVerify.php
+++ b/Tests/Auth/OpenID/RPVerify.php
@@ -45,7 +45,7 @@ class Tests_Auth_OpenID_BuildDiscoveryURL extends PHPUnit_Framework_TestCase {
}
class _MockDiscover {
- function _MockDiscover($data) {
+ function __construct($data) {
$this->data =& $data;
}
@@ -219,7 +219,7 @@ class Tests_Auth_OpenID_ReturnToMatches extends PHPUnit_Framework_TestCase {
}
class Verifier {
- function Verifier($test_case, $return_to)
+ function __construct($test_case, $return_to)
{
$this->tc =& $test_case;
$this->return_to = $return_to;
@@ -281,7 +281,7 @@ class Tests_Auth_OpenID_RPVerify extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_OpenID_RPVerify";
}
- function Tests_Auth_OpenID_RPVerify()
+ function __construct()
{
$this->addTestSuite('Tests_Auth_OpenID_VerifyReturnTo');
$this->addTestSuite('Tests_Auth_OpenID_ReturnToMatches');
diff --git a/Tests/Auth/OpenID/SReg.php b/Tests/Auth/OpenID/SReg.php
index db5cd51..74acdf5 100644
--- a/Tests/Auth/OpenID/SReg.php
+++ b/Tests/Auth/OpenID/SReg.php
@@ -39,7 +39,7 @@ class CheckFieldNameTest extends PHPUnit_Framework_TestCase {
// For supportsSReg test
class FakeEndpoint {
- function FakeEndpoint($supported)
+ function __construct($supported)
{
$this->supported = $supported;
$this->checked_uris = array();
@@ -81,7 +81,7 @@ class SupportsSRegTest extends PHPUnit_Framework_TestCase {
}
class FakeMessage {
- function FakeMessage()
+ function __construct()
{
$this->openid1 = false;
$this->namespaces = new Auth_OpenID_NamespaceMap();
@@ -180,7 +180,7 @@ $__args_sentinel = 'args_sentinel';
$__ns_sentinel = 'ns_sentinel';
class SentinelFakeMessage {
- function SentinelFakeMessage($test_case)
+ function __construct($test_case)
{
$this->test_case =& $test_case;
$this->message = new Auth_OpenID_Message();
@@ -559,7 +559,7 @@ class SRegRequestTest extends PHPUnit_Framework_TestCase {
}
class DummySuccessResponse {
- function DummySuccessResponse($message, $signed_stuff)
+ function __construct($message, $signed_stuff)
{
$this->message = $message;
$this->signed_stuff = $signed_stuff;
@@ -658,7 +658,7 @@ class Tests_Auth_OpenID_SReg extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_OpenID_SReg";
}
- function Tests_Auth_OpenID_SReg()
+ function __construct()
{
$this->addTestSuite('SRegURITest');
$this->addTestSuite('CheckFieldNameTest');
diff --git a/Tests/Auth/OpenID/Server.php b/Tests/Auth/OpenID/Server.php
index d5dea91..2adcd3c 100644
--- a/Tests/Auth/OpenID/Server.php
+++ b/Tests/Auth/OpenID/Server.php
@@ -1532,7 +1532,7 @@ class Tests_Auth_OpenID_CheckIDExtension extends PHPUnit_Framework_TestCase {
class _MockSignatory {
var $isValid = true;
- function _MockSignatory($assoc)
+ function __construct($assoc)
{
$this->assocs = array($assoc);
}
@@ -2019,7 +2019,7 @@ class Tests_Auth_OpenID_Associate extends PHPUnit_Framework_TestCase {
}
class Counter {
- function Counter()
+ function __construct()
{
$this->count = 0;
}
@@ -2442,7 +2442,7 @@ class Tests_Auth_OpenID_Server extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_OpenID_Server";
}
- function Tests_Auth_OpenID_Server()
+ function __construct()
{
$this->addTestSuite('Tests_Auth_OpenID_Signatory');
$this->addTestSuite('Tests_Auth_OpenID_ServerTest');
diff --git a/Tests/Auth/OpenID/StoreTest.php b/Tests/Auth/OpenID/StoreTest.php
index 0847619..c4c58f5 100644
--- a/Tests/Auth/OpenID/StoreTest.php
+++ b/Tests/Auth/OpenID/StoreTest.php
@@ -696,7 +696,7 @@ class Tests_Auth_OpenID_Included_StoreTest extends Tests_Auth_OpenID_Store {
$db->query("USE $temp_db_name");
- $store =& new Auth_OpenID_MDB2Store($db);
+ $store = new Auth_OpenID_MDB2Store($db);
if (!$store->createTables()) {
$this->fail("Failed to create tables");
return;
@@ -751,7 +751,7 @@ class Tests_Auth_OpenID_StoreTest extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_OpenID_StoreTest";
}
- function Tests_Auth_OpenID_StoreTest()
+ function __construct()
{
$this->addTestSuite('Tests_Auth_OpenID_Included_StoreTest');
$this->addTestSuite('Tests_Auth_OpenID_MemcachedStore_Test');
diff --git a/Tests/Auth/OpenID/TrustRoot.php b/Tests/Auth/OpenID/TrustRoot.php
index 3603940..86b6cde 100644
--- a/Tests/Auth/OpenID/TrustRoot.php
+++ b/Tests/Auth/OpenID/TrustRoot.php
@@ -8,7 +8,7 @@ require_once "Auth/OpenID/TrustRoot.php";
require_once "Tests/Auth/OpenID/TestUtil.php";
class Tests_Auth_OpenID_TRParseCase extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_TRParseCase($desc, $case, $expected)
+ function __construct($desc, $case, $expected)
{
$this->setName($desc);
$this->case = $case;
@@ -36,7 +36,7 @@ class Tests_Auth_OpenID_TRParseCase extends PHPUnit_Framework_TestCase {
}
class Tests_Auth_OpenID_TRMatchCase extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_TRMatchCase($desc, $tr, $rt, $matches)
+ function __construct($desc, $tr, $rt, $matches)
{
$this->setName($desc);
$this->tr = $tr;
@@ -155,7 +155,7 @@ function Tests_Auth_OpenID_trustRootTests()
}
class Tests_Auth_OpenID_TrustRoot extends PHPUnit_Framework_TestSuite {
- function Tests_Auth_OpenID_TrustRoot($name)
+ function __construct($name)
{
$this->setName($name);
diff --git a/Tests/Auth/OpenID/URINorm.php b/Tests/Auth/OpenID/URINorm.php
index b79b780..17f2f70 100644
--- a/Tests/Auth/OpenID/URINorm.php
+++ b/Tests/Auth/OpenID/URINorm.php
@@ -18,7 +18,7 @@ require_once 'Auth/OpenID/URINorm.php';
require_once 'Tests/Auth/OpenID/TestUtil.php';
class Tests_Auth_OpenID_URINorm_TestCase extends PHPUnit_Framework_TestCase {
- function Tests_Auth_OpenID_URINorm_TestCase(
+ function __construct(
$name, $uri, $expected)
{
@@ -53,7 +53,7 @@ class Tests_Auth_OpenID_URINorm extends PHPUnit_Framework_TestSuite {
return $cases;
}
- function Tests_Auth_OpenID_URINorm($name)
+ function __construct($name)
{
$this->setName($name);
$cases = $this->_readTestCases();
diff --git a/Tests/Auth/OpenID/VerifyDisco.php b/Tests/Auth/OpenID/VerifyDisco.php
index ea2566d..e3db702 100644
--- a/Tests/Auth/OpenID/VerifyDisco.php
+++ b/Tests/Auth/OpenID/VerifyDisco.php
@@ -52,7 +52,7 @@ class _DiscoverAndVerify extends OpenIDTestMixin {
}
class _Tests_discoveryOverride {
- function _Tests_discoveryOverride($endpoint)
+ function __construct($endpoint)
{
$this->endpoint = $endpoint;
}
diff --git a/Tests/Auth/Yadis/Discover_Yadis.php b/Tests/Auth/Yadis/Discover_Yadis.php
index 0ca3b2e..4a486a8 100644
--- a/Tests/Auth/Yadis/Discover_Yadis.php
+++ b/Tests/Auth/Yadis/Discover_Yadis.php
@@ -26,7 +26,7 @@ function mkResponse($data)
return $r;
}
class TestFetcher {
- function TestFetcher($base_url)
+ function __construct($base_url)
{
$this->base_url = $base_url;
}
@@ -73,7 +73,7 @@ class NoContentTypeFetcher {
}
class MockFetcher {
- function MockFetcher() {
+ function __construct() {
$this->count = 0;
}
@@ -103,7 +103,7 @@ class TestSecondGet extends PHPUnit_Framework_TestCase {
class _TestCase extends PHPUnit_Framework_TestCase {
var $base_url = 'http://invalid.unittest/';
- function _TestCase($input_name, $id_name, $result_name, $success)
+ function __construct($input_name, $id_name, $result_name, $success)
{
parent::__construct();
$this->input_name = $input_name;
@@ -169,7 +169,7 @@ class Tests_Auth_Yadis_Discover_Yadis extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_Yadis_Discover_Yadis";
}
- function Tests_Auth_Yadis_Discover_Yadis()
+ function __construct()
{
global $testlist;
diff --git a/Tests/Auth/Yadis/ParseHTML.php b/Tests/Auth/Yadis/ParseHTML.php
index e3977bc..444946d 100644
--- a/Tests/Auth/Yadis/ParseHTML.php
+++ b/Tests/Auth/Yadis/ParseHTML.php
@@ -17,7 +17,7 @@ require_once 'Tests/Auth/Yadis/TestUtil.php';
require_once 'Auth/Yadis/ParseHTML.php';
class Tests_Auth_Yadis_ParseTest extends PHPUnit_Framework_TestCase {
- function Tests_Auth_Yadis_ParseTest($case)
+ function __construct($case)
{
list($result, $comment, $html) = $case;
@@ -72,7 +72,7 @@ class Tests_Auth_Yadis_ParseHTML extends PHPUnit_Framework_TestSuite {
return $tests;
}
- function Tests_Auth_Yadis_ParseHTML()
+ function __construct()
{
$test_data = Tests_Auth_Yadis_readdata('test1-parsehtml.txt');
diff --git a/Tests/Auth/Yadis/XRI.php b/Tests/Auth/Yadis/XRI.php
index 403b1e3..2251f23 100644
--- a/Tests/Auth/Yadis/XRI.php
+++ b/Tests/Auth/Yadis/XRI.php
@@ -131,7 +131,7 @@ class Tests_Auth_Yadis_XRI extends PHPUnit_Framework_TestSuite {
return "Tests_Auth_Yadis_XRI";
}
- function Tests_Auth_Yadis_XRI()
+ function __construct()
{
$this->addTest(new Tests_Auth_Yadis_ProxyQueryTestCase());
$this->addTest(new Tests_Auth_Yadis_XriEscapingTestCase());
diff --git a/Tests/Auth/Yadis/Yadis.php b/Tests/Auth/Yadis/Yadis.php
index 5672a15..51efb14 100644
--- a/Tests/Auth/Yadis/Yadis.php
+++ b/Tests/Auth/Yadis/Yadis.php
@@ -9,8 +9,7 @@ require_once 'Tests/Auth/Yadis/TestUtil.php';
class Tests_Auth_Yadis_DiscoveryTest extends PHPUnit_Framework_TestCase {
- function Tests_Auth_Yadis_DiscoveryTest($input_url, $redir_uri,
- $xrds_uri, $num)
+ function __construct($input_url, $redir_uri, $xrds_uri, $num)
{
$this->input_url = $input_url;
$this->redir_uri = $redir_uri;
@@ -68,7 +67,7 @@ class Tests_Auth_Yadis_Yadis extends PHPUnit_Framework_TestSuite {
return $tests;
}
- function Tests_Auth_Yadis_Yadis()
+ function __construct()
{
$test_data = file_get_contents('http://www.openidenabled.com/resources/yadis-test/discover/manifest.txt');