Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
/**
4
 * Master Unit Test Suite file for Structures_Graph
5
 *
6
 * This top-level test suite file organizes
7
 * all class test suite files,
8
 * so that the full suite can be run
9
 * by PhpUnit or via "pear run-tests -u".
10
 *
11
 * PHP version 5
12
 *
13
 * @category   XML
14
 * @package    XML_Util
15
 * @subpackage UnitTesting
16
 * @author     Chuck Burgess <ashnazg@php.net>
17
 * @license    http://www.opensource.org/licenses/bsd-license.php New BSD License
18
 * @version    CVS: $Id$
19
 * @link       http://pear.php.net/package/XML_Util
20
 * @since      1.2.0a1
21
 */
22
 
23
 
24
/**
25
 * Check PHP version... PhpUnit v3+ requires at least PHP v5.1.4
26
 */
27
if (version_compare(PHP_VERSION, "5.1.4") < 0) {
28
    // Cannnot run test suites
29
    echo 'Cannot run test suite via PhpUnit... requires at least PHP v5.1.4.' . PHP_EOL;
30
    echo 'Use "pear run-tests -p xml_util" to run the PHPT tests directly.' . PHP_EOL;
31
    exit(1);
32
}
33
 
34
 
35
/**
36
 * Derive the "main" method name
37
 * @internal PhpUnit would have to rename PHPUnit_MAIN_METHOD to PHPUNIT_MAIN_METHOD
38
 *           to make this usage meet the PEAR CS... we cannot rename it here.
39
 */
40
if (!defined('PHPUnit_MAIN_METHOD')) {
41
    define('PHPUnit_MAIN_METHOD', 'Structures_Graph_AllTests::main');
42
}
43
 
44
 
45
/*
46
 * Files needed by PhpUnit
47
 */
48
require_once 'PHPUnit/Framework.php';
49
require_once 'PHPUnit/TextUI/TestRunner.php';
50
require_once 'PHPUnit/Extensions/PhptTestSuite.php';
51
 
52
/*
53
 * You must add each additional class-level test suite file here
54
 */
55
require_once dirname(__FILE__).'/testCase/BasicGraph.php';
56
 
57
 
58
/**
59
 * Master Unit Test Suite class for Structures_Graph
60
 *
61
 * This top-level test suite class organizes
62
 * all class test suite files,
63
 * so that the full suite can be run
64
 * by PhpUnit or via "pear run-tests -up Structures_Graph".
65
 *
66
 * @category   Structures
67
 * @package    Structures_Graph
68
 * @subpackage UnitTesting
69
 * @author     Chuck Burgess <ashnazg@php.net>
70
 * @license    http://www.opensource.org/licenses/bsd-license.php New BSD License
71
 * @version    Release: @package_version@
72
 * @link       http://pear.php.net/package/XML_Util
73
 * @since      1.2.0a1
74
 */
75
class Structures_Graph_AllTests
76
{
77
 
78
    /**
79
     * Launches the TextUI test runner
80
     *
81
     * @return void
82
     * @uses PHPUnit_TextUI_TestRunner
83
     */
84
    public static function main()
85
    {
86
        PHPUnit_TextUI_TestRunner::run(self::suite());
87
    }
88
 
89
 
90
    /**
91
     * Adds all class test suites into the master suite
92
     *
93
     * @return PHPUnit_Framework_TestSuite a master test suite
94
     *                                     containing all class test suites
95
     * @uses PHPUnit_Framework_TestSuite
96
     */
97
    public static function suite()
98
    {
99
        $suite = new PHPUnit_Framework_TestSuite(
100
            'Structures_Graph Full Suite of Unit Tests');
101
 
102
        /*
103
         * You must add each additional class-level test suite name here
104
         */
105
        $suite->addTestSuite('BasicGraph');
106
 
107
        return $suite;
108
    }
109
}
110
 
111
/**
112
 * Call the main method if this file is executed directly
113
 * @internal PhpUnit would have to rename PHPUnit_MAIN_METHOD to PHPUNIT_MAIN_METHOD
114
 *           to make this usage meet the PEAR CS... we cannot rename it here.
115
 */
116
if (PHPUnit_MAIN_METHOD == 'Structures_Graph_AllTests::main') {
117
    Structures_Graph_AllTests::main();
118
}
119
 
120
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
121
?>