From 499494f372c322bc66a46f50299615bdbe2d179d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 20 Sep 2017 09:09:51 +0200 Subject: Update to 3.1.0 use phpunit6 on F26+ --- .gitignore | 1 + php-pear-PHP-CodeSniffer.spec | 26 ++++++++++++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 1ab5c4f..fc9aa8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +clog package-*.xml *.tgz *.tar.gz diff --git a/php-pear-PHP-CodeSniffer.spec b/php-pear-PHP-CodeSniffer.spec index b182b6e..7b26cab 100644 --- a/php-pear-PHP-CodeSniffer.spec +++ b/php-pear-PHP-CodeSniffer.spec @@ -13,7 +13,7 @@ %global pear_name PHP_CodeSniffer Name: php-pear-PHP-CodeSniffer -Version: 3.0.2 +Version: 3.1.0 Release: 1%{?dist} Summary: PHP coding standards enforcement tool @@ -26,7 +26,12 @@ BuildArch: noarch BuildRequires: php(language) >= 5.4 BuildRequires: php-pear # to run test suite -BuildRequires: php-phpunit-PHPUnit +%if 0%{?fedora} >= 26 +%global phpunit %{_bindir}/phpunit6 +%else +%global phpunit %{_bindir}/phpunit +%endif +BuildRequires: %{phpunit} Requires(post): %{__pear} Requires(postun): %{__pear} @@ -84,14 +89,15 @@ install -pm 644 %{pear_name}.xml %{buildroot}%{pear_xmldir} %check -cd %{pear_name}-%{version}/tests +cd %{pear_name}-%{version} -# Version 3.0.1: Tests: 238, Assertions: 86, Skipped: 3. +# Version 3.1.0: Tests: 242, Assertions: 88, Skipped: 3. ret=0 -for cmd in php php56 php70 php71 php72; do - if which $cmd; then - $cmd %{_bindir}/phpunit AllTests.php || ret=1 - fi +for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1 + fi done exit $ret @@ -118,6 +124,10 @@ fi %changelog +* Wed Sep 20 2017 Remi Collet - 3.1.0-1 +- Update to 3.1.0 +- use phpunit6 on F26+ + * Tue Jul 18 2017 Remi Collet - 3.0.2-1 - Update to 3.0.2 -- cgit