summaryrefslogtreecommitdiffstats
path: root/php-nikic-fast-route-tests-autoloader.php
diff options
context:
space:
mode:
Diffstat (limited to 'php-nikic-fast-route-tests-autoloader.php')
-rw-r--r--php-nikic-fast-route-tests-autoloader.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/php-nikic-fast-route-tests-autoloader.php b/php-nikic-fast-route-tests-autoloader.php
new file mode 100644
index 0000000..c484d51
--- /dev/null
+++ b/php-nikic-fast-route-tests-autoloader.php
@@ -0,0 +1,10 @@
+<?php
+
+spl_autoload_register(function($class) {
+ if (strpos($class, 'FastRoute\\') === 0 && strcasecmp(substr($class, -4), 'Test') === 0) {
+ $name = substr($class, strlen('FastRoute'));
+ require __DIR__ . strtr($name, '\\', DIRECTORY_SEPARATOR) . '.php';
+ }
+});
+
+require_once 'BUILDROOT_PATH/bootstrap.php';