diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-19 15:45:34 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-19 15:45:34 +0200 |
commit | f8180391fd668ec8e4cb6366bf43682ced99509b (patch) | |
tree | 39c4b7fa0cda368a95a2df040b16b129a645ee62 /lib/autoloader.php | |
parent | ffa463382231cac2446b0a39520b53068e4581b9 (diff) | |
download | nextcloud-server-f8180391fd668ec8e4cb6366bf43682ced99509b.tar.gz nextcloud-server-f8180391fd668ec8e4cb6366bf43682ced99509b.zip |
Create a Fallback in the old autoloader for PSR-4 Test\TestCase
Diffstat (limited to 'lib/autoloader.php')
-rw-r--r-- | lib/autoloader.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/autoloader.php b/lib/autoloader.php index ff9db924cdd..215da536e5b 100644 --- a/lib/autoloader.php +++ b/lib/autoloader.php @@ -113,6 +113,10 @@ class Autoloader { // If not found in the root of the app directory, insert '/lib' after app id and try again. $paths[] = $appPath . '/lib/' . strtolower(str_replace('\\', '/', $rest) . '.php'); } + } elseif ($class === 'Test\\TestCase') { + // This File is considered public API, so we make sure that the class + // can still be loaded, although the PSR-4 paths have not been loaded. + $paths[] = \OC::$SERVERROOT . '/tests/lib/TestCase.php'; } elseif (strpos($class, 'Test\\') === 0) { $paths[] = \OC::$SERVERROOT . '/tests/lib/' . strtolower(str_replace('\\', '/', substr($class, 5)) . '.php'); } |