bootstrap.php 575 B

1234567891011121314151617181920212223
  1. <?php
  2. define('PHPUNIT_RUN', 1);
  3. $configDir = getenv('CONFIG_DIR');
  4. if ($configDir) {
  5. define('PHPUNIT_CONFIG_DIR', $configDir);
  6. }
  7. require_once __DIR__ . '/../lib/base.php';
  8. \OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);
  9. \OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true);
  10. // load all enabled apps
  11. \OC_App::loadApps();
  12. if (!class_exists('PHPUnit_Framework_TestCase')) {
  13. require_once('PHPUnit/Autoload.php');
  14. }
  15. OC_Hook::clear();
  16. set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/php');