summaryrefslogtreecommitdiffstats
path: root/php-phpunit-comparator.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-phpunit-comparator.spec')
-rw-r--r--php-phpunit-comparator.spec27
1 files 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 <remi@fedoraproject.org> - 1.0.1-1
+- update to 1.0.1
+- enable test suite
+
* Fri Jul 18 2014 Remi Collet <remi@fedoraproject.org> - 1.0.0-2
- add composer dependencies