diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-09-11 08:05:00 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-09-11 08:05:00 +0200 |
commit | e6af67d5eabd77e336207b7a82cfba5dafe45a26 (patch) | |
tree | d5c35e052fb70b264342e584beaed46ae7024f6e | |
parent | 0dcd8079dcf0286caa3702620737eaec058a64cf (diff) | |
parent | 0878f722db3d576dbdf0b1e00a88d10890acdc4a (diff) | |
download | nextcloud-server-e6af67d5eabd77e336207b7a82cfba5dafe45a26.tar.gz nextcloud-server-e6af67d5eabd77e336207b7a82cfba5dafe45a26.zip |
Merge pull request #9698 from owncloud/fix-9666
Load apps in tests, fixes #9666
-rw-r--r-- | apps/files_external/tests/mountconfig.php | 4 | ||||
-rw-r--r-- | tests/bootstrap.php | 4 | ||||
-rw-r--r-- | tests/lib/files/utils/scanner.php | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/apps/files_external/tests/mountconfig.php b/apps/files_external/tests/mountconfig.php index 8a49401a07b..fc482823843 100644 --- a/apps/files_external/tests/mountconfig.php +++ b/apps/files_external/tests/mountconfig.php @@ -20,8 +20,6 @@ * */ -require_once __DIR__ . '/../../../lib/base.php'; - class Test_Mount_Config_Dummy_Storage { public function test() { return true; @@ -60,7 +58,7 @@ class Test_Mount_Config extends \PHPUnit_Framework_TestCase { \OC_User::setUserId(self::TEST_USER1); $this->userHome = \OC_User::getHome(self::TEST_USER1); - mkdir($this->userHome); + @mkdir($this->userHome); $this->dataDir = \OC_Config::getValue( 'datadirectory', diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 99374d68a5c..8dd7784d430 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -10,6 +10,10 @@ if ($configDir) { require_once __DIR__ . '/../lib/base.php'; +// load minimum set of apps +OC_App::loadApps(array('authentication')); +OC_App::loadApps(array('filesystem', 'logging')); + if (!class_exists('PHPUnit_Framework_TestCase')) { require_once('PHPUnit/Autoload.php'); } diff --git a/tests/lib/files/utils/scanner.php b/tests/lib/files/utils/scanner.php index 5e5cc6ac128..27b9b8dd4f4 100644 --- a/tests/lib/files/utils/scanner.php +++ b/tests/lib/files/utils/scanner.php @@ -49,7 +49,7 @@ class Scanner extends \PHPUnit_Framework_TestCase { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new TestScanner(''); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection()); $scanner->addMount($mount); $scanner->scan(''); @@ -71,7 +71,7 @@ class Scanner extends \PHPUnit_Framework_TestCase { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new TestScanner(''); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection()); $scanner->addMount($mount); $scanner->scan(''); @@ -98,7 +98,7 @@ class Scanner extends \PHPUnit_Framework_TestCase { $storage->file_put_contents('foo.txt', 'qwerty'); $storage->file_put_contents('folder/bar.txt', 'qwerty'); - $scanner = new TestScanner(''); + $scanner = new TestScanner('', \OC::$server->getDatabaseConnection()); $originalPropagator = $scanner->getPropagator(); $scanner->setPropagator($propagator); $scanner->addMount($mount); |