예제 #1
0
 public function __construct($options = array())
 {
     // for BC
     if (!is_array($options)) {
         $options = array();
         // drop the old output because it is not compatible with LimeTest
     } else {
         if (array_key_exists('php_cli', $options)) {
             $options['executable'] = $options['php_cli'];
             unset($options['php_cli']);
         }
     }
     parent::__construct($options);
 }
예제 #2
0
<?php

/*
 * This file is part of the Sonata RESTful PHP framework
 * (c) 2009-2010 Pascal Cremer <*****@*****.**>
 * (c) 2004-2006 Fabien Potencier <*****@*****.**>
 *
 * @author 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/lime2/lib/LimeAutoloader.php';
LimeAutoloader::register();
LimeAnnotationSupport::enable();
$h = new LimeTestSuite(array('force_colors' => isset($argv) && in_array('--color', $argv), 'verbose' => isset($argv) && in_array('--verbose', $argv)));
$h->base_dir = realpath(dirname(__FILE__) . '/..');
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/../unit'), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
    if (preg_match('/Test\\.php$/', $file)) {
        $h->register($file->getRealPath());
    }
}
exit($h->run() ? 0 : 1);
예제 #3
0
파일: coverage.php 프로젝트: vtprepo/Twig
<?php

/*
 * This file is part of Twig.
 *
 * (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/LimeAutoloader.php';
LimeAutoloader::register();
$suite = new LimeTestSuite(array('force_colors' => isset($argv) && in_array('--color', $argv), 'base_dir' => realpath(dirname(__FILE__) . '/..')));
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/../unit'), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
    if (preg_match('/Test\\.php$/', $file)) {
        $suite->register($file->getRealPath());
    }
}
$coverage = new LimeCoverage($suite, array('base_dir' => realpath(dirname(__FILE__) . '/../../lib'), 'extension' => '.php', 'verbose' => true));
$files = array();
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__) . '/../../lib'), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
    if (preg_match('/\\.php$/', $file)) {
        $files[] = $file->getRealPath();
    }
}
$coverage->setFiles($files);
$coverage->run();