Exemple #1
0
/*
 * This file is part of the sfDoctrine package.
 * (c) 2006 Olivier Verdier <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
/**
 * @package    symfony.plugins
 * @subpackage sfDoctrine
 * @author     Pavel Kunc
 * @author     Olivier Verdier <*****@*****.**>
 * @version    SVN: $Id: coverage.php 2690 2006-11-15 18:35:07Z chtito $
 */
$testsDir = realpath(dirname(__FILE__));
define('SF_ROOT_DIR', realpath($testsDir . '/../../../'));
// symfony directories
require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'config.php';
require_once $sf_symfony_lib_dir . '/vendor/lime/lime.php';
$h = new lime_harness(new lime_output_color());
$h->base_dir = dirname(__FILE__);
// unit tests
$h->register_glob($h->base_dir . '/unit/*/*Test.php');
// functional tests
$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');
$c->register_glob($c->base_dir . '/*/*.php');
$c->run();
Exemple #2
0
<?php

$cwd = dirname(__FILE__);
require_once $cwd . '/t.php';
$lime = new lime_harness(null);
$lime->register_glob(dirname(__FILE__) . '/lib/*.php');
$lime->register_glob(dirname(__FILE__) . '/lib/OrgModeSyntax/*.php');
$lime->run();
Exemple #3
0
<?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.
 */
require_once dirname(__FILE__) . '/../../lib/vendor/lime/lime.php';
require_once dirname(__FILE__) . '/../../lib/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');
$h->register_glob($h->base_dir . '/../lib/plugins/*/unit/*Test.php');
$h->register_glob($h->base_dir . '/../lib/plugins/*/unit/*/*Test.php');
// functional tests
$h->register_glob($h->base_dir . '/functional/*Test.php');
$h->register_glob($h->base_dir . '/functional/*/*Test.php');
$h->register_glob($h->base_dir . '/../lib/plugins/*/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();
Exemple #4
0
 * (c) 2004-2006 Fabien Potencier <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
$name = '*';
$verbose = false;
if (isset($argv[1])) {
    $name = $argv[1];
    $verbose = true;
}
require_once dirname(__FILE__) . '/../../lib/vendor/lime/lime.php';
require_once dirname(__FILE__) . '/../../lib/util/sfFinder.class.php';
$h = new lime_harness();
$h->base_dir = realpath(dirname(__FILE__) . '/..');
// unit tests
$h->register_glob(sprintf('%s/unit/*/%sTest.php', $h->base_dir, $name));
$h->register_glob(sprintf('%s/unit/*/*/%sTest.php', $h->base_dir, $name));
$h->register_glob(sprintf('%s/../lib/plugins/*/unit/%sTest.php', $h->base_dir, $name));
$h->register_glob(sprintf('%s/../lib/plugins/*/unit/*/%sTest.php', $h->base_dir, $name));
// functional tests
$h->register_glob(sprintf('%s/functional/%sTest.php', $h->base_dir, $name));
$h->register_glob(sprintf('%s/functional/*/%sTest.php', $h->base_dir, $name));
$h->register_glob(sprintf('%s/../lib/plugins/*/functional/%sTest.php', $h->base_dir, $name));
$c = new lime_coverage($h);
$c->extension = '.class.php';
$c->verbose = $verbose;
$c->base_dir = realpath(dirname(__FILE__) . '/../../lib');
$finder = sfFinder::type('file')->name($name . '.class.php')->prune('vendor')->prune('test')->prune('data');
$c->register($finder->in($c->base_dir));
$c->run();
Exemple #5
0
<?php

include_once dirname(__FILE__) . '/t.php';
$h = new lime_harness(new lime_output());
$h->register_glob(dirname(__FILE__) . '/../*.php');
$h->run();
Exemple #6
0
<?php

include 'lime.php';
// Beware, lime.php was changed to accept a -c argument for this to work!
$harness = new lime_harness(array('php_cli' => $argv[1]));
$harness->register_glob('unit_tests_*.php');
//$harness->register('coord2d_tests.php');
//$harness->register('envelope_tests.php');
$harness->run();
Exemple #7
0
<?php

/*
 * This file is part of the sfDoctrine package.
 * (c) 2006 Olivier Verdier <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
/**
 * @package    symfony.plugins
 * @subpackage sfDoctrine
 * @author     Pavel Kunc
 * @author     Olivier Verdier <*****@*****.**>
 * @version    SVN: $Id: prove.php 2874 2006-11-29 16:48:01Z chtito $
 */
$testsDir = realpath(dirname(__FILE__));
require_once $testsDir . '/bootstrap/unit.php';
$h = new lime_harness(new lime_output_color());
$h->base_dir = $testsDir;
// cache autoload files
testAutoloader::initialize(true);
// unit tests
$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');
// other tests
//$h->register_glob($h->base_dir.'/other/*Test.php');
$h->run();
testAutoloader::removeCache();
Exemple #8
0
<?php

include_once dirname(__FILE__) . '/t.php';
$lime = new lime_harness(null);
$lime->register_glob(dirname(__FILE__) . '/lib/*.php');
$lime->register_glob(dirname(__FILE__) . '/lib/HatenaSyntax/*.php');
$lime->run();