File: alltests

package info (click to toggle)
phpreports 0.3.6-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 620 kB
  • ctags: 1,149
  • sloc: php: 2,668; xml: 157; makefile: 29; python: 10; sh: 2
file content (36 lines) | stat: -rw-r--r-- 681 bytes parent folder | download
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
#!/usr/bin/php4 -Cq
<?php

$testfiles = array(
	// Do not move this first test suite
        'InternalTest' => array('InternalTest')
        );

global $TESTING;
$TESTING=true;
chdir('..');

error_reporting(E_ALL);
ini_set('include_path', ini_get('include_path').':testing');

require_once 'PHPUnit.php';

foreach ($testfiles as $file => $tests)
{
        require_once "$file.php";

        echo "Now running tests from $file.php...\n";

        $suite = new PHPUnit_TestSuite();

        foreach ($tests as $test)
        {
                $suite->addTestSuite($test);
        }

        $result = PHPUnit::run($suite);

	echo $result->toString();
}

echo "All Tests Complete\n";