From 09e12257f6cc2ddd9ae7b9ec7f586270809893f7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 6 Jan 2020 15:32:41 +0100 Subject: check compat autoloader --- php-laminas-stdlib.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/php-laminas-stdlib.spec b/php-laminas-stdlib.spec index fdf252d..2f65593 100644 --- a/php-laminas-stdlib.spec +++ b/php-laminas-stdlib.spec @@ -130,8 +130,7 @@ require_once '%{buildroot}%{php_home}/%{namespace}/%{library}/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('%{namespace}Test\\%{library}\\', dirname(__DIR__) . '/test'); EOF -php %{buildroot}%{php_home}/Zend/%{library}/autoload.php - +: upstream test suite ret=0 for cmdarg in "php %{phpunit}" php72 php73 php74; do if which $cmdarg; then @@ -139,6 +138,13 @@ for cmdarg in "php %{phpunit}" php72 php73 php74; do $1 ${2:-%{_bindir}/phpunit7} --verbose || ret=1 fi done + +: check compat autoloader +php -r ' +require "%{buildroot}%{php_home}/Zend/%{library}/autoload.php"; +return (class_exists("\\Zend\\Stdlib\\ConsoleHelper") ? 0 : 1); +' + exit $ret %else : Test suite disabled -- cgit