From 595a073aaa900d63f6e2f77f0e46b0456e60450c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 16 Jan 2020 15:36:50 +0100 Subject: only load phpunit-class-aliases if PHPUnit loaded --- php-laminas-test.spec | 9 +++++++-- 1 file 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 - 3.3.0-2 +- only load phpunit-class-aliases if PHPUnit loaded + * Thu Jan 16 2020 Remi Collet - 3.3.0-1 - switch to Laminas -- cgit