prove.php 810 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /*
  3. * This file is part of the symfony package.
  4. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  5. *
  6. * For the full copyright and license information, please view the LICENSE
  7. * file that was distributed with this source code.
  8. */
  9. require_once __DIR__.'/../lib/vendor/lime/LimeAutoloader.php';
  10. LimeAutoloader::register();
  11. $h = new LimeTestSuite(array(
  12. 'force_colors' => isset($argv) && in_array('--color', $argv),
  13. 'verbose' => isset($argv) && in_array('--verbose', $argv),
  14. ));
  15. $h->base_dir = realpath(__DIR__.'/..');
  16. foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(__DIR__.'/../unit'), RecursiveIteratorIterator::LEAVES_ONLY) as $file)
  17. {
  18. if (preg_match('/Test\.php$/', $file))
  19. {
  20. $h->register($file->getRealPath());
  21. }
  22. }
  23. exit($h->run() ? 0 : 1);