From a39935810c80eb7ba62bc9fbc3fd22291cbc26b7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 11 Jul 2016 22:39:42 +0200 Subject: [PATCH] fix Travis errors with phpunit 4.8 under PHP < 7 --- api/src/Mail/test/CredentialsTest.php | 3 +-- doc/php_syntax_check.sh | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/src/Mail/test/CredentialsTest.php b/api/src/Mail/test/CredentialsTest.php index 7c0d62872c..2443a09560 100644 --- a/api/src/Mail/test/CredentialsTest.php +++ b/api/src/Mail/test/CredentialsTest.php @@ -17,7 +17,6 @@ namespace EGroupware\Api\Mail; require_once realpath(__DIR__.'/../../loader/common.php'); // autoloader & check_load_extension use EGroupware\Api; -use PHPUnit\Framework\TestCase; use ReflectionClass; use EGroupware\Api\Mail\Credentials; @@ -27,7 +26,7 @@ use EGroupware\Api\Mail\Credentials; * Only testing en&decryption of mail passwords so far. * Further tests would need database. */ -class CredentialsTest extends TestCase +class CredentialsTest extends PHPUnit_Framework_TestCase { /** * Test new 16.1 AES password encryption with OpenSSL diff --git a/doc/php_syntax_check.sh b/doc/php_syntax_check.sh index 6d26944296..8acd1bdfaf 100755 --- a/doc/php_syntax_check.sh +++ b/doc/php_syntax_check.sh @@ -2,7 +2,7 @@ ################################################################################ ### Tool to check for PHP Syntax errors ### Usage: doc/php_syntax_check [file or directory, defaults to whole egrouware] -### Will output all PHP Fatal, Parse erros and also Deprecated incl. filename +### Will output all PHP Fatal, Parse errors and also Deprecated incl. filename ### Exit-status: 0 on no error, but maybe Deprecated warnings, 1 on error ################################################################################ @@ -21,6 +21,8 @@ find ${@-.} -name '*.php' -exec php -l {} \; 2>&1 | \ grep -v 'vendor/pear-pear.php.net/PEAR/PEAR/Autoloader.php' | \ # exclude composer conditional included autoload_static.php, as it requires PHP 5.6+ grep -v 'vendor/composer/autoload_static.php' | \ + # exclude vendor/phpunit it shows many PHP Parse errors in PHP < 7.0 + grep -v 'vendor/phpunit' | \ # phpFreeChat does not work with PHP7 grep -v 'phpfreechat/phpfreechat/' | \ perl -pe 'END { exit $status } $status=1 if /^(PHP Fatal|(PHP )?Parse error)/;' > /dev/null