From ebce5ab0a4a99a0a126d0796801964ca35b0e976 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 22 Oct 2016 11:21:56 +0200 Subject: php-phpunit-PHPUnit: use fedora/autoloader --- phpunit-5.4.0-Autoload.php.in | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) (limited to 'phpunit-5.4.0-Autoload.php.in') diff --git a/phpunit-5.4.0-Autoload.php.in b/phpunit-5.4.0-Autoload.php.in index c295c8f..6466fb8 100644 --- a/phpunit-5.4.0-Autoload.php.in +++ b/phpunit-5.4.0-Autoload.php.in @@ -1,41 +1,19 @@ register(); +if (!class_exists('Fedora\\Autoloader\\Autoload', false)) { + require_once 'Fedora/Autoloader/autoload.php'; } -/* for symfony/yaml */ -$fedoraClassLoader->addPrefix('Symfony\\Component\\', $vendorDir); - -spl_autoload_register( - function ($class) - { - static $classes = NULL; - - if ($classes === NULL) { - $classes = array( - ___CLASSLIST___ - ); - } - - $cn = strtolower($class); - - if (isset($classes[$cn])) { - require __DIR__ . $classes[$cn]; - } - } +\Fedora\Autoloader\Autoload::addClassMap( + array( + ___CLASSLIST___ + ), + __DIR__ ); /* Required */ +require_once 'Symfony/Component/autoload.php'; require_once 'File/Iterator/Autoload.php'; require_once 'SebastianBergmann/CodeCoverage/autoload.php'; require_once 'PHP/Timer/Autoload.php'; -- cgit