|
|
|
@ -32,7 +32,7 @@
|
|
|
|
|
|
|
|
|
|
Name: php-%{composer_vendor}-%{composer_project}
|
|
|
|
|
Version: %{github_version}
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: Fedora Autoloader
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
@ -119,13 +119,24 @@ cp -p res/phpab/fedora*.php.tpl %{buildroot}%{phpab_template_dir}/
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{with_tests}
|
|
|
|
|
: Create tests bootstrap
|
|
|
|
|
cat <<'BOOTSTRAP' | tee bootstrap.php
|
|
|
|
|
<?php
|
|
|
|
|
require '%{buildroot}%{phpdir}/Fedora/Autoloader/autoload.php';
|
|
|
|
|
|
|
|
|
|
if (!class_exists('PHPUnit\\Framework\\TestCase')) {
|
|
|
|
|
class_alias('PHPUnit_Framework_TestCase', 'PHPUnit\\Framework\\TestCase');
|
|
|
|
|
}
|
|
|
|
|
BOOTSTRAP
|
|
|
|
|
|
|
|
|
|
: Upstream tests
|
|
|
|
|
RETURN_CODE=0
|
|
|
|
|
for PHP_EXEC in "php %{phpunit}" %{?rhel:php54 php55 php56} php70 "php71 %{_bindir}/phpunit6" "php72 %{_bindir}/phpunit6" "php73 %{_bindir}/phpunit6" "php74 %{_bindir}/phpunit6"; do
|
|
|
|
|
set $PHP_EXEC
|
|
|
|
|
if [ "php" == "$1" ] || which $PHP_EXEC; then
|
|
|
|
|
$1 -d include_path=.:%{buildroot}%{phpdir}:%{phpdir}:%{_datadir}/pear \
|
|
|
|
|
${2:-%{_bindir}/phpunit} \
|
|
|
|
|
--bootstrap %{buildroot}%{phpdir}/Fedora/Autoloader/autoload.php \
|
|
|
|
|
--bootstrap bootstrap.php \
|
|
|
|
|
--verbose
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
@ -148,6 +159,9 @@ exit $RETURN_CODE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Feb 12 2020 Shawn Iwinski <shawn@iwin.ski> - 1.0.1-2
|
|
|
|
|
- Add tests bootstrap to fix EPEL6 build
|
|
|
|
|
|
|
|
|
|
* Wed Feb 12 2020 Shawn Iwinski <shawn@iwin.ski> - 1.0.1-1
|
|
|
|
|
- Update to 1.0.1 (RHBZ #1802372)
|
|
|
|
|
|
|
|
|
|