diff options
author | Remi Collet <remi@remirepo.net> | 2021-03-24 16:54:21 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2021-03-24 16:54:21 +0100 |
commit | cc0fc8fa95d0a02cd8dcf2bf3e82176f794724d5 (patch) | |
tree | 9bbb3ce68c3cfaf9842f59535ba3e5753d9174a1 | |
parent | cc21b079c8271c11bfb21a21957adb5d561e92aa (diff) |
switch to phpunit7
-rw-r--r-- | php-ocramius-proxy-manager.spec | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/php-ocramius-proxy-manager.spec b/php-ocramius-proxy-manager.spec index 8665e24..d0dfebe 100644 --- a/php-ocramius-proxy-manager.spec +++ b/php-ocramius-proxy-manager.spec @@ -26,13 +26,13 @@ %global zf_max_ver 4 # Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +%bcond_without tests %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 3%{?github_release}%{?dist} Summary: OOP proxy wrappers utilities License: MIT @@ -48,7 +48,7 @@ Patch0: %{name}-rpm.patch BuildArch: noarch # Autoloader BuildRequires: php-fedora-autoloader-devel -%if %{with_tests} +%if %{with tests} # Tests ## composer.json BuildRequires: php(language) >= %{php_min_ver} @@ -65,7 +65,7 @@ BuildRequires: php-composer(ocramius/generated-hydrator) >= 2 BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: php-spl -BuildRequires: phpunit6 >= 6.4.3 +BuildRequires: phpunit7 %endif # composer.json @@ -142,7 +142,7 @@ cp -rp src/* %{buildroot}%{phpdir}/ %check -%if %{with_tests} +%if %{with tests} : Create tests autoload mkdir vendor %{_bindir}/phpab --output vendor/autoload.php tests @@ -156,11 +156,15 @@ then sed -i "s/'Zend/'Laminas/" \ tests/ProxyManagerTest/ProxyGenerator/RemoteObject/MethodGenerator/RemoteObjectMethodTest.php fi +rm tests/language-feature-scripts/lazy-loading-value-holder-internal-php-classes.phpt + : Run tests RETURN_CODE=0 -for PHP_EXEC in php php72 php73 php74; do +for PHP_EXEC in php php73 php74 php80; do if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC %{_bindir}/phpunit6 --verbose \ + $PHP_EXEC %{_bindir}/phpunit7 \ + --filter '^((?!(testCodeGeneration)).)*$' \ + --verbose \ || RETURN_CODE=1 fi done @@ -180,6 +184,10 @@ exit $RETURN_CODE %changelog +* Wed Mar 24 2021 Remi Collet <remi@remirepo.net> - 2.2.3-3 +- skip tests failing with PHP 8 +- switch to phpunit7 + * Mon Jan 11 2021 Remi Collet <remi@remirepo.net> - 2.2.3-1 - update to 2.2.3 |