summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-01-10 21:36:14 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-01-10 21:36:14 +0100
commit1a592e574593e79df1e0ed6b418cd880c4a5f7ee (patch)
tree9921a0861508d46dd474082b1e7b165d65ba5847 /lib/base.php
parentfce8c4224017fcf33f691d67786ebef94d602702 (diff)
downloadnextcloud-server-1a592e574593e79df1e0ed6b418cd880c4a5f7ee.tar.gz
nextcloud-server-1a592e574593e79df1e0ed6b418cd880c4a5f7ee.zip
Only '/tests' to be autoloaded when running unit tests
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/base.php b/lib/base.php
index f1ee298a2fc..80b1a2bafcd 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -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);