_bootstrap.php 710 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. foreach (array_keys($grav['setup']->getStreams()) as $stream) {
  12. @stream_wrapper_unregister($stream);
  13. }
  14. $grav['streams'];
  15. $grav['uri']->init();
  16. $grav['debugger']->init();
  17. $grav['assets']->init();
  18. $grav['config']->set('system.cache.enabled', false);
  19. $grav['locator']->addPath('tests', '', 'tests', false);
  20. return $grav;
  21. };
  22. Fixtures::add('grav', $grav);
  23. $fake = Factory::create();
  24. Fixtures::add('fake', $fake);