diff --git a/.travis.yml b/.travis.yml index 083af02..61206d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,15 @@ language: php sudo: false php: - - 5.6 - 7.0 - 7.1 - 7.2 - 7.3 - 7.4 + - 8.0 + - 8.1.0 + - 8.2.0 + - 8.3.0 # Disable xdebug for PHP >= 7.3 # https://stackoverflow.com/questions/65172031/vendor-bin-phpunit-exited-with-2 before_script: diff --git a/composer.json b/composer.json index fd97b87..87b64c8 100644 --- a/composer.json +++ b/composer.json @@ -43,10 +43,10 @@ }, "type": "library", "require": { - "php": ">=5.6", + "php": ">=7.0", "pear/pear-core-minimal": "^1.10.1" }, "require-dev": { - "phpunit/phpunit": "^4" + "phpunit/phpunit": "^9.3" } } diff --git a/tests/AllTests.php b/tests/AllTests.php index 0059556..79167a2 100644 --- a/tests/AllTests.php +++ b/tests/AllTests.php @@ -11,15 +11,17 @@ class HTML_Template_IT_AllTests { + private static $runner; + public static function main() { - - PHPUnit_TextUI_TestRunner::run(self::suite()); + $runner = new PHPUnit\TextUI\TestRunner; + $runner->run(self::suite()); } public static function suite() { - $suite = new PHPUnit_Framework_TestSuite('HTML_Template_IT tests'); + $suite = new PHPUnit\Framework\TestSuite('HTML_Template_IT tests'); $suite->addTestSuite('ITTest'); $suite->addTestSuite('ITXTest'); diff --git a/tests/ITTest.php b/tests/ITTest.php index ac95752..bbe2ba3 100644 --- a/tests/ITTest.php +++ b/tests/ITTest.php @@ -1,7 +1,7 @@ tpl = new HTML_Template_IT(dirname(__FILE__) . '/templates'); } - function tearDown() + protected function tearDown(): void { unset($this->tpl); } diff --git a/tests/ITXTest.php b/tests/ITXTest.php index 87f19c2..ebf6dfb 100644 --- a/tests/ITXTest.php +++ b/tests/ITXTest.php @@ -23,7 +23,7 @@ static function _numberFormatCallback($float, $decimals) class ITXTest extends ITTest { - function setUp() + function setUp(): void { $this->tpl = new HTML_Template_ITX(dirname(__FILE__) . '/templates'); }