<?php /* * This file is part of the symfony package. * (c) 2004-2006 Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ define('SYMFONY_LIB_DIR', realpath(dirname(__FILE__) . '/../../../..')); require SYMFONY_LIB_DIR . '/vendor/lime/lime.php'; require SYMFONY_LIB_DIR . '/util/sfFinder.class.php'; $h = new lime_harness(new lime_output_color()); $h->base_dir = realpath(dirname(__FILE__) . '/..'); // unit tests $h->register_glob($h->base_dir . '/unit/*/*Test.php'); $h->register_glob($h->base_dir . '/unit/*/*/*Test.php'); // functional tests $h->register_glob($h->base_dir . '/functional/*Test.php'); $h->register_glob($h->base_dir . '/functional/*/*Test.php'); $c = new lime_coverage($h); $c->extension = '.class.php'; $c->verbose = false; $c->base_dir = realpath(dirname(__FILE__) . '/../lib'); $finder = sfFinder::type('file')->name('*.php')->prune('vendor')->prune('test')->prune('data'); $c->register($finder->in($c->base_dir)); $c->run();
<?php /* * This file is part of the symfony package. * (c) Fabien Potencier <*****@*****.**> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require_once dirname(__FILE__) . '/../lib/lime/lime.php'; $h = new lime_harness(new lime_output(isset($argv) && in_array('--color', $argv))); $h->base_dir = realpath(dirname(__FILE__) . '/..'); foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/..'), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { if (preg_match('/Test\\.php$/', $file)) { $h->register($file->getRealPath()); } } $c = new lime_coverage($h); $c->extension = '.php'; $c->verbose = true; $c->base_dir = realpath(dirname(__FILE__) . '/../../lib'); foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/../../lib'), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { if (preg_match('/\\.php$/', $file)) { $c->register($file->getRealPath()); } } $c->run();