Make testsiote compatible with php 7.2, 1st pass
authorgggeek <giunta.gaetano@gmail.com>
Fri, 6 Apr 2018 23:43:26 +0000 (00:43 +0100)
committergggeek <giunta.gaetano@gmail.com>
Fri, 6 Apr 2018 23:43:26 +0000 (00:43 +0100)
test/PHPUnit/TestCase.php
test/PHPUnit/TestDecorator.php
test/PHPUnit/TestFailure.php
test/PHPUnit/TestResult.php
test/PHPUnit/TestSuite.php

index be46b88..4619cbd 100644 (file)
@@ -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);
         }
index bf9afe0..715f9c0 100644 (file)
 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'))) {
index f30d451..6ce8329 100644 (file)
@@ -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;
     }
index 6d1c37a..0ccbfe6 100644 (file)
 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.
  *
index 55220b7..b4adad9 100644 (file)
@@ -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;
     }