Files
cospend-nc/tests/bootstrap.php
2019-02-12 02:03:08 +01:00

27 lines
668 B
PHP
Executable File

<?php
/**
* Nextcloud - cospend
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
*/
define('PHPUNIT_RUN', 1);
// ugly hack to fix issues with template code using static code
$_SERVER['REQUEST_URI'] = '/index.php/apps/cospend/';
$_SERVER['SCRIPT_NAME'] = '/index.php';
require_once __DIR__.'/../../../lib/base.php';
if (version_compare(implode('.', \OCP\Util::getVersion()), '8.2', '>=')) {
\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
\OC_App::loadApp('cospend');
}
//if(!class_exists('PHPUnit_Framework_TestCase')) {
// require_once('PHPUnit/Autoload.php');
//}
OC_Hook::clear();