summaryrefslogtreecommitdiffstats
path: root/php-laminas-test.spec
diff options
context:
space:
mode:
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