diff options
| author | Remi Collet <fedora@famillecollet.com> | 2014-09-07 18:59:21 +0200 | 
|---|---|---|
| committer | Remi Collet <fedora@famillecollet.com> | 2014-09-07 18:59:21 +0200 | 
| commit | ed0314cd1c344de1b5863183ebd5b694a906cac9 (patch) | |
| tree | 1f0450d99973c1ccbeb76f91cfbb800ede9e398f | |
| parent | 2ef54472011bfe79669aa93a2f1d8f3123747f4d (diff) | |
php-phpunit-PHPUnit-MockObject: 2.2.1
| -rw-r--r-- | php-phpunit-PHPUnit-MockObject.spec | 33 | ||||
| -rw-r--r-- | phpunit-mock-objects-upstream.patch | 23 | 
2 files changed, 50 insertions, 6 deletions
| diff --git a/php-phpunit-PHPUnit-MockObject.spec b/php-phpunit-PHPUnit-MockObject.spec index 371f2b2..6ee1757 100644 --- a/php-phpunit-PHPUnit-MockObject.spec +++ b/php-phpunit-PHPUnit-MockObject.spec @@ -6,18 +6,22 @@  #  # Please, preserve the changelog entries  # -%global gh_commit    42e589e08bc86e3e9bdf20d385e948347788505b +%global bootstrap    0 +%global gh_commit    b241b18d87a47093f20fae8b0ba40379b00bd53a  %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})  %global gh_owner     sebastianbergmann  %global gh_project   phpunit-mock-objects  %global php_home     %{_datadir}/php  %global pear_name    PHPUnit_MockObject  %global pear_channel pear.phpunit.de -# disable because of circular dep 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-PHPUnit-MockObject -Version:        2.2.0 +Version:        2.2.1  Release:        1%{?dist}  Summary:        Mock Object library for PHPUnit @@ -32,6 +36,9 @@ Source1:        Autoload.php.in  # Temporary workaround, under investigation  Patch0:         %{gh_project}-rpm.patch +# Upstream patches +Patch1:         %{gh_project}-upstream.patch +  BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)  BuildArch:      noarch  BuildRequires:  %{_bindir}/phpab @@ -65,6 +72,7 @@ Mock Object library for PHPUnit  %setup -q -n %{gh_project}-%{gh_commit}  %patch0 -p1 +%patch1 -p1  find . -name \*.orig -exec rm {} \; -print @@ -84,12 +92,21 @@ cp -pr src %{buildroot}%{php_home}/PHPUnit  %if %{with_tests}  %check +# No phpcov +grep -v 'log' phpunit.xml.dist > phpunit.xml + +# Generate autoloader for tests +phpab --output tests/_fixture/autoload.php tests/_fixture/ + +# Fix bootstrap  mkdir vendor  ln -s ../src/Framework/MockObject/Autoload.php vendor/autoload.php +cat <<EOF >>tests/bootstrap.php +require __DIR__ . '/_fixture/autoload.php'; +EOF -grep -v 'log' phpunit.xml.dist > phpunit.xml -phpunit \ -  -d date.timezone=UTC +# Run tests +phpunit -d date.timezone=UTC  %endif @@ -115,6 +132,10 @@ fi  %changelog +* Sun Sep  7 2014 Remi Collet <remi@fedoraproject.org> - 2.2.1-1 +- update to 2.2.0 +- enable test suite +  * Mon Aug 11 2014 Remi Collet <remi@fedoraproject.org> - 2.2.0-1  - update to 2.2.0  - add dependency on ocramius/instantiator diff --git a/phpunit-mock-objects-upstream.patch b/phpunit-mock-objects-upstream.patch new file mode 100644 index 0000000..846679b --- /dev/null +++ b/phpunit-mock-objects-upstream.patch @@ -0,0 +1,23 @@ +From fe3dc6c5d6a8998ae917aed0b2f09fd4cdde16ba Mon Sep 17 00:00:00 2001 +From: Jeff Welch <whatthejeff@gmail.com> +Date: Sat, 6 Sep 2014 13:37:44 -0400 +Subject: [PATCH] Refs #197: Skip variadics test on PHP < 5.6.0. + +--- + tests/MockObject/class_with_method_with_variadic_arguments.phpt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/MockObject/class_with_method_with_variadic_arguments.phpt b/tests/MockObject/class_with_method_with_variadic_arguments.phpt +index bb38da7..8fb9a3c 100644 +--- a/tests/MockObject/class_with_method_with_variadic_arguments.phpt ++++ b/tests/MockObject/class_with_method_with_variadic_arguments.phpt +@@ -1,5 +1,9 @@ + --TEST-- + PHPUnit_Framework_MockObject_Generator::generate('ClassWithMethodWithVariadicArguments', array(), 'MockFoo', TRUE, TRUE) ++--SKIPIF-- ++<?php ++if (version_compare(PHP_VERSION, '5.6.0', '<')) print 'skip: PHP >= 5.6.0 required'; ++?> + --FILE-- + <?php + class ClassWithMethodWithVariadicArguments | 
