-
Notifications
You must be signed in to change notification settings - Fork 181
/
Copy pathcoverage.php
38 lines (27 loc) · 1.08 KB
/
coverage.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <[email protected]>
*
* 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();
$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));
$allTestsSucceed = $c->run();
exit($allTestsSucceed ? 0 : 1);