Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
/**
3
 * PEAR_Info no-regression test suite
4
 *
5
 * PHP version 5
6
 *
7
 * LICENSE: This source file is subject to version 3.01 of the PHP license
8
 * that is available through the world-wide-web at the following URI:
9
 * http://www.php.net/license/3_01.txt.  If you did not receive a copy of
10
 * the PHP License and are unable to obtain it through the web, please
11
 * send a note to license@php.net so we can mail you a copy immediately.
12
 *
13
 * @category  PEAR
14
 * @package   PEAR_Info
15
 * @author    Laurent Laville <pear@laurent-laville.org>
16
 * @copyright 2007-2009 Laurent Laville
17
 * @license   http://www.php.net/license/3_01.txt  PHP License 3.01
18
 * @version   CVS: $Id: AllTests.php,v 1.8 2009/01/05 21:02:49 farell Exp $
19
 * @link      http://pear.php.net/package/PEAR_Info
20
 * @since     File available since Release 1.7.0
21
 */
22
 
23
if (!defined('PHPUnit_MAIN_METHOD')) {
24
    define('PHPUnit_MAIN_METHOD', 'PEAR_Info_AllTests::main');
25
}
26
 
27
require_once 'PHPUnit/Framework.php';
28
require_once 'PHPUnit/TextUI/TestRunner.php';
29
 
30
chdir(dirname(__FILE__));
31
 
32
require_once 'PEAR_Info_TestSuite_Standard.php';
33
 
34
/**
35
 * PEAR_Info no-regression test suite
36
 *
37
 * Run all tests from the package root directory:
38
 * #phpunit PEAR_Info_AllTests tests/AllTests.php
39
 * or
40
 * #php tests/AllTests.php
41
 * or for code coverage testing
42
 * #phpunit --coverage-html tests/coverage PEAR_Info_AllTests tests/AllTests.php
43
 *
44
 * After the code coverage test browse the index.html file in tests/coverage.
45
 * The code coverage is close to 100%.
46
 *
47
 * @category  PEAR
48
 * @package   PEAR_Info
49
 * @author    Laurent Laville <pear@laurent-laville.org>
50
 * @copyright 2007-2009 Laurent Laville
51
 * @license   http://www.php.net/license/3_01.txt  PHP License 3.01
52
 * @version   Release: 1.9.2
53
 * @link      http://pear.php.net/package/PEAR_Info
54
 * @since     Class available since Release 1.7.0
55
 */
56
 
57
class PEAR_Info_AllTests
58
{
59
    /**
60
     * Runs the test suite
61
     *
62
     * @return void
63
     * @static
64
     * @since  1.7.0
65
     */
66
    public static function main()
67
    {
68
        PHPUnit_TextUI_TestRunner::run(self::suite());
69
    }
70
 
71
    /**
72
     * Runs the test suite
73
     *
74
     * @return object the PHPUnit_Framework_TestSuite object
75
     * @static
76
     * @since  1.7.0
77
     */
78
    public static function suite()
79
    {
80
        $dir   = dirname(__FILE__);
81
        $suite = new PHPUnit_Framework_TestSuite('PEAR_Info Test Suite');
82
        $suite->addTestSuite(new PEAR_Info_TestSuite_Standard($dir));
83
        return $suite;
84
    }
85
}
86
 
87
if (PHPUnit_MAIN_METHOD == 'PEAR_Info_AllTests::main') {
88
    PEAR_Info_AllTests::main();
89
}
90
?>