Update for PHPunit 5.7

This commit is contained in:
uwetews
2017-04-13 19:32:44 +02:00
parent 7645ae0512
commit 31a515470d
3 changed files with 8 additions and 4 deletions

2
tests/.gitignore vendored
View File

@@ -10,3 +10,5 @@ TestResults.tap
TestResults.txt TestResults.txt
.templates_c/*.php .templates_c/*.php
.cache/*.php .cache/*.php
/composer.lock
/vendor

View File

@@ -26,10 +26,12 @@ if (!defined('SMARTY_COMPOSER_INSTALL')) {
} }
unset($file); unset($file);
} }
if (!class_exists('PHPUnit_Framework_TestCase')) { if (!class_exists('PHPUnit_Framework_TestCase') && !class_exists('\PHPUnit\Framework\TestCase')) {
require_once SMARTY_COMPOSER_INSTALL; 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'; require_once 'PHPUnit_Smarty.php';
if (!ini_get('date.timezone')) { if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'Europe/Berlin'); ini_set('date.timezone', 'Europe/Berlin');

View File

@@ -25,8 +25,8 @@
"forum": "http://www.smarty.net/forums/" "forum": "http://www.smarty.net/forums/"
}, },
"require": { "require": {
"phpunit/phpunit": "4.6.6", "phpunit/phpunit": "~5.7",
"php": ">=5.2" "php": ">=5.3"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [