From 1953105885129ba31110dff2cd1e0e267b3de332 Mon Sep 17 00:00:00 2001 From: gggeek Date: Sat, 7 Apr 2018 00:43:26 +0100 Subject: [PATCH] Make testsiote compatible with php 7.2, 1st pass --- test/PHPUnit/TestCase.php | 2 +- test/PHPUnit/TestDecorator.php | 6 +----- test/PHPUnit/TestFailure.php | 2 +- test/PHPUnit/TestResult.php | 4 ---- test/PHPUnit/TestSuite.php | 4 ++-- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/test/PHPUnit/TestCase.php b/test/PHPUnit/TestCase.php index be46b88..4619cbd 100644 --- a/test/PHPUnit/TestCase.php +++ b/test/PHPUnit/TestCase.php @@ -106,7 +106,7 @@ class PHPUnit_TestCase extends PHPUnit_Assert { * @param string * @access public */ - function PHPUnit_TestCase($name = FALSE) { + function __construct($name = FALSE) { if ($name !== FALSE) { $this->setName($name); } diff --git a/test/PHPUnit/TestDecorator.php b/test/PHPUnit/TestDecorator.php index bf9afe0..715f9c0 100644 --- a/test/PHPUnit/TestDecorator.php +++ b/test/PHPUnit/TestDecorator.php @@ -23,10 +23,6 @@ require_once 'PHPUnit/TestCase.php'; require_once 'PHPUnit/TestSuite.php'; -if (!function_exists('is_a')) { - require_once 'PHP/Compat/Function/is_a.php'; -} - /** * A Decorator for Tests. * @@ -58,7 +54,7 @@ class PHPUnit_TestDecorator { * @param object * @access public */ - function PHPUnit_TestDecorator(&$test) { + function __construct(&$test) { if (is_object($test) && (is_a($test, 'PHPUnit_TestCase') || is_a($test, 'PHPUnit_TestSuite'))) { diff --git a/test/PHPUnit/TestFailure.php b/test/PHPUnit/TestFailure.php index f30d451..6ce8329 100644 --- a/test/PHPUnit/TestFailure.php +++ b/test/PHPUnit/TestFailure.php @@ -52,7 +52,7 @@ class PHPUnit_TestFailure { * @param string * @access public */ - function PHPUnit_TestFailure(&$failedTest, &$thrownException) { + function __construct(&$failedTest, &$thrownException) { $this->_failedTest = &$failedTest; $this->_thrownException = &$thrownException; } diff --git a/test/PHPUnit/TestResult.php b/test/PHPUnit/TestResult.php index 6d1c37a..0ccbfe6 100644 --- a/test/PHPUnit/TestResult.php +++ b/test/PHPUnit/TestResult.php @@ -23,10 +23,6 @@ require_once 'PHPUnit/TestFailure.php'; require_once 'PHPUnit/TestListener.php'; -if (!function_exists('is_a')) { - require_once 'PHP/Compat/Function/is_a.php'; -} - /** * A TestResult collects the results of executing a test case. * diff --git a/test/PHPUnit/TestSuite.php b/test/PHPUnit/TestSuite.php index 55220b7..b4adad9 100644 --- a/test/PHPUnit/TestSuite.php +++ b/test/PHPUnit/TestSuite.php @@ -79,7 +79,7 @@ class PHPUnit_TestSuite { * @param mixed * @access public */ - function PHPUnit_TestSuite($test = FALSE) { + function __construct($test = FALSE) { if ($test !== FALSE) { $this->setName($test); $this->addTestSuite($test); @@ -92,7 +92,7 @@ class PHPUnit_TestSuite { * @param object * @access public */ - function addTest(&$test) { + function addTest($test) { $this->_tests[] = &$test; } -- 2.43.0