bootstrap.php 841 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. // fix encoding issue while running text on different host with different locale configuration
  11. setlocale(LC_ALL, 'en_US.UTF-8');
  12. if (file_exists($file = __DIR__.'/autoload.php')) {
  13. require_once $file;
  14. } elseif (file_exists($file = __DIR__.'/autoload.php.dist')) {
  15. require_once $file;
  16. }
  17. // try to get Symfony's PHPunit Bridge
  18. $files = array_filter(array(
  19. __DIR__.'/../../vendor/symfony/symfony/src/Symfony/Bridge/PhpUnit/bootstrap.php',
  20. __DIR__.'/../../vendor/symfony/phpunit-bridge/bootstrap.php',
  21. ), 'file_exists');
  22. if ($files) {
  23. require_once current($files);
  24. }