diff --git a/tests/.gitignore b/tests/.gitignore index c7bcd248..494e54b8 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -10,3 +10,5 @@ TestResults.tap TestResults.txt .templates_c/*.php .cache/*.php +/composer.lock +/vendor \ No newline at end of file diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index c407fe0b..efb3723d 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -26,10 +26,12 @@ if (!defined('SMARTY_COMPOSER_INSTALL')) { } unset($file); } -if (!class_exists('PHPUnit_Framework_TestCase')) { +if (!class_exists('PHPUnit_Framework_TestCase') && !class_exists('\PHPUnit\Framework\TestCase')) { require_once SMARTY_COMPOSER_INSTALL; } - +if (!class_exists('\PHPUnit_Framework_TestCase') && class_exists('\PHPUnit\Framework\TestCase')) { + class_alias('\PHPUnit\Framework\TestCase', '\PHPUnit_Framework_TestCase'); +} require_once 'PHPUnit_Smarty.php'; if (!ini_get('date.timezone')) { ini_set('date.timezone', 'Europe/Berlin'); diff --git a/tests/composer.json b/tests/composer.json index 2a22df0f..9821b715 100644 --- a/tests/composer.json +++ b/tests/composer.json @@ -25,8 +25,8 @@ "forum": "http://www.smarty.net/forums/" }, "require": { - "phpunit/phpunit": "4.6.6", - "php": ">=5.2" + "phpunit/phpunit": "~5.7", + "php": ">=5.3" }, "autoload": { "classmap": [