From 66046803f50aa903ae1792b87f71a2fd3b5cf8c4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 5 Oct 2014 19:44:38 +0200 Subject: php-phpunit-environment: 1.0.1 --- php-phpunit-environment.spec | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/php-phpunit-environment.spec b/php-phpunit-environment.spec index 93b77a7..b2c282c 100644 --- a/php-phpunit-environment.spec +++ b/php-phpunit-environment.spec @@ -6,17 +6,21 @@ # # Please, preserve the changelog entries # -%global gh_commit 79517609ec01139cd7e9fded0dd7ce08c952ef6a +%global bootstrap 0 +%global gh_commit 10c7467da0622f7848cc5cadc0828c3359254df4 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project environment %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-environment -Version: 1.0.0 -Release: 4%{?dist} +Version: 1.0.1 +Release: 1%{?dist} Summary: Handle HHVM/PHP environments Group: Development/Libraries @@ -61,6 +65,16 @@ cp -pr src %{buildroot}%{php_home}/Environment %if %{with_tests} %check +if [ -d /usr/share/php/PHPUnit ] +then + # Hack PHPUnit 4 autoloader to not use system library + mkdir PHPUnit + sed -e 's:SebastianBergmann/Environment:src:' \ + -e 's:dirname(__FILE__):"/usr/share/php/PHPUnit":' \ + /usr/share/php/PHPUnit/Autoload.php \ + >PHPUnit/Autoload.php +fi + phpunit \ --bootstrap src/autoload.php \ -d date.timezone=UTC @@ -79,6 +93,10 @@ rm -rf %{buildroot} %changelog +* Sun Oct 5 2014 Remi Collet - 1.0.1-1 +- update to 1.0.1 +- enable test suite + * Wed Jun 25 2014 Remi Collet - 1.0.0-4 - composer dependencies -- cgit