1
0

bootstrap.php 698 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. define('PHPUNIT_RUN', 1);
  8. $configDir = getenv('CONFIG_DIR');
  9. if ($configDir) {
  10. define('PHPUNIT_CONFIG_DIR', $configDir);
  11. }
  12. require_once __DIR__ . '/../lib/base.php';
  13. \OC::$composerAutoloader->addPsr4('Test\\', OC::$SERVERROOT . '/tests/lib/', true);
  14. \OC::$composerAutoloader->addPsr4('Tests\\', OC::$SERVERROOT . '/tests/', true);
  15. // load all enabled apps
  16. \OC_App::loadApps();
  17. OC_Hook::clear();
  18. set_include_path(
  19. get_include_path() . PATH_SEPARATOR
  20. . '/usr/share/php' . PATH_SEPARATOR
  21. . __DIR__ . '/..'
  22. );