_bootstrap.php 846 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Grav;
  3. use Codeception\Util\Fixtures;
  4. use Faker\Factory;
  5. use Grav\Common\Grav;
  6. ini_set('error_log', __DIR__ . '/error.log');
  7. $grav = function () {
  8. Grav::resetInstance();
  9. $grav = Grav::instance();
  10. $grav['config']->init();
  11. // This must be set first before the other init
  12. $grav['config']->set('system.languages.supported', ['en', 'fr', 'vi']);
  13. $grav['config']->set('system.languages.default_lang', 'en');
  14. foreach (array_keys($grav['setup']->getStreams()) as $stream) {
  15. @stream_wrapper_unregister($stream);
  16. }
  17. $grav['streams'];
  18. $grav['uri']->init();
  19. $grav['debugger']->init();
  20. $grav['assets']->init();
  21. $grav['config']->set('system.cache.enabled', false);
  22. $grav['locator']->addPath('tests', '', 'tests', false);
  23. return $grav;
  24. };
  25. Fixtures::add('grav', $grav);