bootstrap.php 676 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 (!defined('HHVM_VERSION')) {
  8. if(version_compare(phpversion(), '5.6.0', '>=') &&
  9. ini_get('always_populate_raw_post_data') !== '-1') {
  10. throw new Exception("'always_populate_raw_post_data' has to be set to '-1' in your php.ini");
  11. }
  12. }
  13. require_once __DIR__ . '/../lib/base.php';
  14. // load minimum set of apps
  15. OC_App::loadApps(array('authentication'));
  16. OC_App::loadApps(array('filesystem', 'logging'));
  17. if (!class_exists('PHPUnit_Framework_TestCase')) {
  18. require_once('PHPUnit/Autoload.php');
  19. }
  20. OC_Hook::clear();
  21. OC_Log::$enabled = false;