summaryrefslogtreecommitdiffstats
path: root/php-ocramius-instantiator.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-08-16 12:28:08 +0200
committerRemi Collet <fedora@famillecollet.com>2014-08-16 12:28:08 +0200
commitc987937a4656bd772e4b2fe4b7aad828904304d5 (patch)
tree0dbd4b93db334b527ee15b9e1269e29cf4a20907 /php-ocramius-instantiator.spec
parent996267f528b8d0e9be912204773d4502b6bd085e (diff)
php-ocramius-instantiator: sync with rawhide
Diffstat (limited to 'php-ocramius-instantiator.spec')
-rw-r--r--php-ocramius-instantiator.spec21
1 files changed, 14 insertions, 7 deletions
diff --git a/php-ocramius-instantiator.spec b/php-ocramius-instantiator.spec
index b4a0af9..6f11d1e 100644
--- a/php-ocramius-instantiator.spec
+++ b/php-ocramius-instantiator.spec
@@ -18,10 +18,11 @@
%else
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%endif
+%global phpverid %(%{_bindir}/php -r 'echo PHP_VERSION_ID;' || echo 50000)
Name: php-ocramius-instantiator
Version: 1.1.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Instantiate objects in PHP without invoking their constructors
Group: Development/Libraries
@@ -71,23 +72,26 @@ cp -pr src/* %{buildroot}%{_datadir}/php
%check
%if %{with_tests}
: Generate autoloader
-phpab \
+%{_bindir}/php -d date.timezone=UTC \
+%{_bindir}/phpab \
--basedir $PWD \
--output autoload.php \
src tests %{_datadir}/php/LazyMap
-# Hack PHPUnit autoloader to not use system Instantiator
+if [ -d /usr/share/php/PHPUnit ]; then
+# Hack PHPUnit 4.x autoloader to not use system Instantiator
mkdir PHPUnit
sed -e '/Instantiator/d' \
-e 's:dirname(__FILE__):"/usr/share/php/PHPUnit":' \
/usr/share/php/PHPUnit/Autoload.php \
>PHPUnit/Autoload.php
+fi
-: Run test suite
-phpunit \
+: Run test suite with PHP %{phpverid}
+%{_bindir}/phpunit \
--bootstrap autoload.php \
-%if "%{?php_version}" > "5.6"
- -d date.timezone=UTC || : Ignore test suite result with PHP %{?php_version}
+%if %{phpverid} >= 50600
+ -d date.timezone=UTC || : Ignore test suite result
%else
-d date.timezone=UTC
%endif
@@ -109,6 +113,9 @@ rm -rf %{buildroot}
%changelog
+* Sat Aug 16 2014 Remi Collet <remi@fedoraproject.org> - 1.1.2-2
+- fix test suite
+
* Sat Aug 16 2014 Remi Collet <remi@fedoraproject.org> - 1.1.2-1
- update to 1.1.2