summaryrefslogtreecommitdiffstats
path: root/phpunit-5.3.0-Autoload.php.in
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-01 06:58:20 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-01 06:58:20 +0200
commit9650e43d3cda56bd3c663562d79627bda37e68b2 (patch)
treec5a1dd0e54023b1ad95c59e7a6cb0538ed8e4c30 /phpunit-5.3.0-Autoload.php.in
parent173d28aa953168abac680d025e251a3ccb5ac3fc (diff)
php-phpunit-PHPUnit: 5.3.0
Diffstat (limited to 'phpunit-5.3.0-Autoload.php.in')
-rw-r--r--phpunit-5.3.0-Autoload.php.in67
1 files changed, 67 insertions, 0 deletions
diff --git a/phpunit-5.3.0-Autoload.php.in b/phpunit-5.3.0-Autoload.php.in
new file mode 100644
index 0000000..5eba070
--- /dev/null
+++ b/phpunit-5.3.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 'PHP/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(array(
+ '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;
+ }
+}