Only '/tests' to be autoloaded when running unit tests

This commit is contained in:
Roeland Jago Douma 2016-01-10 21:36:14 +01:00
parent fce8c42240
commit 1a592e5745
1 changed files with 3 additions and 1 deletions

View File

@ -488,8 +488,10 @@ class OC {
OC::$SERVERROOT . '/settings',
OC::$SERVERROOT . '/ocs',
OC::$SERVERROOT . '/ocs-provider',
OC::$SERVERROOT . '/tests',
]);
if (defined('PHPUNIT_RUN')) {
self::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
}
spl_autoload_register(array(self::$loader, 'load'));
$loaderEnd = microtime(true);