diff options
author | splitt3r <splitt3r@users.noreply.github.com> | 2017-10-09 19:08:36 +0300 |
---|---|---|
committer | splitt3r <splitt3r@users.noreply.github.com> | 2017-10-09 19:08:36 +0300 |
commit | 19ecdc08a324f5f5a96f68c7f975aca9b69ad23b (patch) | |
tree | 1f146434ee4625c13e0934a2275e1ff1b8a27c0e /tests/bootstrap.php | |
parent | 0faa40a07aa0831d21b4be386b064bc4bb4c83ac (diff) |
Match NC style guide
Diffstat (limited to 'tests/bootstrap.php')
-rw-r--r-- | tests/bootstrap.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/bootstrap.php b/tests/bootstrap.php index eebb738d..64fc285e 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -21,4 +21,20 @@ * */ -require_once __DIR__ . '/../../../tests/bootstrap.php'; +if (!defined('PHPUNIT_RUN')) { + define('PHPUNIT_RUN', 1); +} + +require_once(__DIR__.'/../../../lib/base.php'); + +// Fix for "Autoload path not allowed: .../tests/lib/testcase.php" +\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests'); + +// Fix for "Autoload path not allowed: .../polls/tests/testcase.php" +\OC_App::loadApp('polls'); + +if (!class_exists('PHPUnit_Framework_TestCase')) { + require_once('PHPUnit/Autoload.php'); +} + +OC_Hook::clear(); |