From 88cc1cd64a1f649d232c05e342c4241f80c6dcce Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 5 Oct 2014 19:40:32 +0200 Subject: php-phpunit-comparator: 1.0.1 --- php-phpunit-comparator.spec | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/php-phpunit-comparator.spec b/php-phpunit-comparator.spec index 7461b5c..dbd9409 100644 --- a/php-phpunit-comparator.spec +++ b/php-phpunit-comparator.spec @@ -6,17 +6,21 @@ # # Please, preserve the changelog entries # -%global gh_commit f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2 +%global bootstrap 0 +%global gh_commit e54a01c0da1b87db3c5a3c4c5277ddf331da4aef %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project comparator %global php_home %{_datadir}/php/SebastianBergmann -# Circular dependency with phpunit +%if %{bootstrap} %global with_tests %{?_with_tests:1}%{!?_with_tests:0} +%else +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} +%endif Name: php-phpunit-comparator -Version: 1.0.0 -Release: 3%{?dist} +Version: 1.0.1 +Release: 1%{?dist} Summary: Compare PHP values for equality Group: Development/Libraries @@ -71,6 +75,17 @@ cp -pr src %{buildroot}%{php_home}/Comparator %if %{with_tests} %check sed -e 's/vendor/src/' -i tests/bootstrap.php + +if [ -d /usr/share/php/PHPUnit ] +then + # Hack PHPUnit 4 autoloader to not use system library + mkdir PHPUnit + sed -e 's:SebastianBergmann/Comparator:src:' \ + -e 's:dirname(__FILE__):"/usr/share/php/PHPUnit":' \ + /usr/share/php/PHPUnit/Autoload.php \ + >PHPUnit/Autoload.php +fi + phpunit \ --bootstrap tests/bootstrap.php \ -d date.timezone=UTC @@ -91,6 +106,10 @@ rm -rf %{buildroot} %changelog +* Sun Oct 5 2014 Remi Collet - 1.0.1-1 +- update to 1.0.1 +- enable test suite + * Fri Jul 18 2014 Remi Collet - 1.0.0-2 - add composer dependencies -- cgit