summaryrefslogtreecommitdiffstats
path: root/php-nikic-fast-route-tests-autoloader.php
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-05-11 08:09:48 +0200
committerRemi Collet <fedora@famillecollet.com>2016-05-11 08:09:48 +0200
commitf36b93bc6ed8bfd8d5a257ba8c48d77bf791f47d (patch)
treef2d2db273e78badfce479a91b8ec152ac63e35dd /php-nikic-fast-route-tests-autoloader.php
php-nikic-fast-route: import from Fedora
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';