bootstrap.php 668 B

123456789101112131415161718192021222324252627
  1. <?php
  2. define('PHPUNIT_RUN', 1);
  3. $configDir = getenv('CONFIG_DIR');
  4. if ($configDir) {
  5. define('PHPUNIT_CONFIG_DIR', $configDir);
  6. }
  7. if(version_compare(phpversion(), '5.6.0', '>=') &&
  8. ini_get('always_populate_raw_post_data') !== '-1') {
  9. throw new Exception("'always_populate_raw_post_data' has to be set to '-1' in your php.ini");
  10. }
  11. require_once __DIR__ . '/../lib/base.php';
  12. // load minimum set of apps
  13. OC_App::loadApps(array('authentication'));
  14. OC_App::loadApps(array('filesystem', 'logging'));
  15. if (!class_exists('PHPUnit_Framework_TestCase')) {
  16. require_once('PHPUnit/Autoload.php');
  17. }
  18. OC_Hook::clear();
  19. OC_Log::$enabled = false;
  20. OC_FileProxy::clearProxies();