summaryrefslogtreecommitdiffstats
path: root/php-laminas-test.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-16 15:36:50 +0100
committerRemi Collet <remi@remirepo.net>2020-01-16 15:36:50 +0100
commit595a073aaa900d63f6e2f77f0e46b0456e60450c (patch)
tree6af0e73e06219638826717d47608a087a0ba672e /php-laminas-test.spec
parent5a3347e39d6ca150b385b4b5305fcfaf00d7376b (diff)
only load phpunit-class-aliases if PHPUnit loaded
Diffstat (limited to 'php-laminas-test.spec')
-rw-r--r--php-laminas-test.spec9
1 files changed, 7 insertions, 2 deletions
diff --git a/php-laminas-test.spec b/php-laminas-test.spec
index f3710ca..f862da2 100644
--- a/php-laminas-test.spec
+++ b/php-laminas-test.spec
@@ -23,7 +23,7 @@
Name: php-%{gh_project}
Version: 3.3.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: %{namespace} Framework %{library} component
License: BSD
@@ -190,7 +190,6 @@ mv autoload/phpunit-class-aliases.php src/
phpab --template fedora --output src/autoload.php src
cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
- __DIR__ . '/phpunit-class-aliases.php',
'%{php_home}/%{namespace}/Console/autoload.php',
'%{php_home}/%{namespace}/Dom/autoload.php',
'%{php_home}/%{namespace}/EventManager/autoload.php',
@@ -204,6 +203,9 @@ cat << 'EOF' | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::optional([
'%{php_home}/%{namespace}/Mvc/Console/autoload.php',
]);
+if (class_exists('PHPUnit_Framework_TestCase') || class_exists('PHPUnit\\Framework\\TestCase')) {
+ require_once __DIR__ . '/phpunit-class-aliases.php';
+}
EOF
cat << 'EOF' | tee zf.php
@@ -292,6 +294,9 @@ exit $ret
%changelog
+* Thu Jan 16 2020 Remi Collet <remi@remirepo.net> - 3.3.0-2
+- only load phpunit-class-aliases if PHPUnit loaded
+
* Thu Jan 16 2020 Remi Collet <remi@remirepo.net> - 3.3.0-1
- switch to Laminas