diff options
Diffstat (limited to 'phpunit-5.4.0-Autoload.php.in')
-rw-r--r-- | phpunit-5.4.0-Autoload.php.in | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/phpunit-5.4.0-Autoload.php.in b/phpunit-5.4.0-Autoload.php.in new file mode 100644 index 0000000..c295c8f --- /dev/null +++ b/phpunit-5.4.0-Autoload.php.in @@ -0,0 +1,67 @@ +<?php +/* Autoloader for phpunit/phpunit and its dependencies */ + +$vendorDir = stream_resolve_include_path('Symfony/Component/ClassLoader/ClassLoader.php'); +$vendorDir = dirname(dirname(dirname(dirname($vendorDir)))); +// Use Symfony autoloader +if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) { + if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) { + require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php'; + } + + $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader(); + $fedoraClassLoader->register(); +} + +/* 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]; + } + } +); + +/* Required */ +require_once 'File/Iterator/Autoload.php'; +require_once 'SebastianBergmann/CodeCoverage/autoload.php'; +require_once 'PHP/Timer/Autoload.php'; +require_once 'PHPUnit/Framework/MockObject/Autoload.php'; +require_once 'Text/Template/Autoload.php'; +require_once 'PHP/Invoker/Autoload.php'; +require_once 'SebastianBergmann/Diff/autoload.php'; +require_once 'SebastianBergmann/Environment/autoload.php'; +require_once 'SebastianBergmann/Exporter/autoload.php'; +require_once 'SebastianBergmann/Version/autoload.php'; +require_once 'SebastianBergmann/Comparator/autoload.php'; +require_once 'SebastianBergmann/GlobalState/autoload.php'; +require_once 'SebastianBergmann/ObjectEnumerator/autoload.php'; +require_once 'Doctrine/Instantiator/autoload.php'; +require_once 'Prophecy/autoload.php'; +require_once 'SebastianBergmann/ResourceOperations/autoload.php'; +require_once 'DeepCopy/autoload.php'; + +/* Optional */ +foreach([ + 'PHPUnit/Extensions/Database/Autoload.php', + 'PHPUnit/Extensions/SeleniumCommon/Autoload.php', + 'PHPUnit/Extensions/SeleniumTestCase/Autoload.php', + 'PHPUnit/Extensions/Story/Autoload.php' + ] as $opt) { + if ($fic = stream_resolve_include_path($opt)) { + require_once $fic; + } +} |