Subversion Repositories Applications.gtt

Rev

Rev 94 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 94 Rev 187
1
<?php
1
<?php
2
/**
2
/**
3
 * PEAR_Command_Test (run-tests)
3
 * PEAR_Command_Test (run-tests)
4
 *
4
 *
5
 * PHP versions 4 and 5
5
 * PHP versions 4 and 5
6
 *
6
 *
7
 * LICENSE: This source file is subject to version 3.0 of the PHP license
-
 
8
 * that is available through the world-wide-web at the following URI:
-
 
9
 * http://www.php.net/license/3_0.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
7
 * @category   pear
14
 * @package    PEAR
8
 * @package    PEAR
15
 * @author     Stig Bakken <ssb@php.net>
9
 * @author     Stig Bakken <ssb@php.net>
16
 * @author     Martin Jansen <mj@php.net>
10
 * @author     Martin Jansen <mj@php.net>
17
 * @author     Greg Beaver <cellog@php.net>
11
 * @author     Greg Beaver <cellog@php.net>
18
 * @copyright  1997-2006 The PHP Group
12
 * @copyright  1997-2009 The Authors
19
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
13
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
20
 * @version    CVS: $Id: Test.php,v 1.15 2007/02/17 17:51:25 cellog Exp $
-
 
21
 * @link       http://pear.php.net/package/PEAR
14
 * @link       http://pear.php.net/package/PEAR
22
 * @since      File available since Release 0.1
15
 * @since      File available since Release 0.1
23
 */
16
 */
24
 
17
 
25
/**
18
/**
26
 * base class
19
 * base class
27
 */
20
 */
28
require_once 'PEAR/Command/Common.php';
21
require_once 'PEAR/Command/Common.php';
29
 
22
 
30
/**
23
/**
31
 * PEAR commands for login/logout
24
 * PEAR commands for login/logout
32
 *
25
 *
33
 * @category   pear
26
 * @category   pear
34
 * @package    PEAR
27
 * @package    PEAR
35
 * @author     Stig Bakken <ssb@php.net>
28
 * @author     Stig Bakken <ssb@php.net>
36
 * @author     Martin Jansen <mj@php.net>
29
 * @author     Martin Jansen <mj@php.net>
37
 * @author     Greg Beaver <cellog@php.net>
30
 * @author     Greg Beaver <cellog@php.net>
38
 * @copyright  1997-2006 The PHP Group
31
 * @copyright  1997-2009 The Authors
39
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
32
 * @license    http://opensource.org/licenses/bsd-license.php New BSD License
40
 * @version    Release: 1.5.1
33
 * @version    Release: 1.10.1
41
 * @link       http://pear.php.net/package/PEAR
34
 * @link       http://pear.php.net/package/PEAR
42
 * @since      Class available since Release 0.1
35
 * @since      Class available since Release 0.1
43
 */
36
 */
44
 
37
 
45
class PEAR_Command_Test extends PEAR_Command_Common
38
class PEAR_Command_Test extends PEAR_Command_Common
46
{
39
{
47
    // {{{ properties
-
 
48
 
-
 
49
    var $commands = array(
40
    var $commands = array(
50
        'run-tests' => array(
41
        'run-tests' => array(
51
            'summary' => 'Run Regression Tests',
42
            'summary' => 'Run Regression Tests',
52
            'function' => 'doRunTests',
43
            'function' => 'doRunTests',
53
            'shortcut' => 'rt',
44
            'shortcut' => 'rt',
54
            'options' => array(
45
            'options' => array(
55
                'recur' => array(
46
                'recur' => array(
56
                    'shortopt' => 'r',
47
                    'shortopt' => 'r',
57
                    'doc' => 'Run tests in child directories, recursively.  4 dirs deep maximum',
48
                    'doc' => 'Run tests in child directories, recursively.  4 dirs deep maximum',
58
                ),
49
                ),
59
                'ini' => array(
50
                'ini' => array(
60
                    'shortopt' => 'i',
51
                    'shortopt' => 'i',
61
                    'doc' => 'actual string of settings to pass to php in format " -d setting=blah"',
52
                    'doc' => 'actual string of settings to pass to php in format " -d setting=blah"',
62
                    'arg' => 'SETTINGS'
53
                    'arg' => 'SETTINGS'
63
                ),
54
                ),
64
                'realtimelog' => array(
55
                'realtimelog' => array(
65
                    'shortopt' => 'l',
56
                    'shortopt' => 'l',
66
                    'doc' => 'Log test runs/results as they are run',
57
                    'doc' => 'Log test runs/results as they are run',
67
                ),
58
                ),
68
                'quiet' => array(
59
                'quiet' => array(
69
                    'shortopt' => 'q',
60
                    'shortopt' => 'q',
70
                    'doc' => 'Only display detail for failed tests',
61
                    'doc' => 'Only display detail for failed tests',
71
                ),
62
                ),
72
                'simple' => array(
63
                'simple' => array(
73
                    'shortopt' => 's',
64
                    'shortopt' => 's',
74
                    'doc' => 'Display simple output for all tests',
65
                    'doc' => 'Display simple output for all tests',
75
                ),
66
                ),
76
                'package' => array(
67
                'package' => array(
77
                    'shortopt' => 'p',
68
                    'shortopt' => 'p',
78
                    'doc' => 'Treat parameters as installed packages from which to run tests',
69
                    'doc' => 'Treat parameters as installed packages from which to run tests',
79
                ),
70
                ),
80
                'phpunit' => array(
71
                'phpunit' => array(
81
                    'shortopt' => 'u',
72
                    'shortopt' => 'u',
82
                    'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests',
73
                    'doc' => 'Search parameters for AllTests.php, and use that to run phpunit-based tests
-
 
74
If none is found, all .phpt tests will be tried instead.',
83
                ),
75
                ),
84
                'tapoutput' => array(
76
                'tapoutput' => array(
85
                    'shortopt' => 't',
77
                    'shortopt' => 't',
86
                    'doc' => 'Output run-tests.log in TAP-compliant format',
78
                    'doc' => 'Output run-tests.log in TAP-compliant format',
87
                ),
79
                ),
88
                'cgi' => array(
80
                'cgi' => array(
89
                    'shortopt' => 'c',
81
                    'shortopt' => 'c',
90
                    'doc' => 'CGI php executable (needed for tests with POST/GET section)',
82
                    'doc' => 'CGI php executable (needed for tests with POST/GET section)',
91
                    'arg' => 'PHPCGI',
83
                    'arg' => 'PHPCGI',
92
                ),
84
                ),
-
 
85
                'coverage' => array(
-
 
86
                    'shortopt' => 'x',
-
 
87
                    'doc'      => 'Generate a code coverage report (requires Xdebug 2.0.0+)',
-
 
88
                ),
-
 
89
                'showdiff' => array(
-
 
90
                    'shortopt' => 'd',
-
 
91
                    'doc' => 'Output diff on test failure',
-
 
92
                ),
93
            ),
93
            ),
94
            'doc' => '[testfile|dir ...]
94
            'doc' => '[testfile|dir ...]
95
Run regression tests with PHP\'s regression testing script (run-tests.php).',
95
Run regression tests with PHP\'s regression testing script (run-tests.php).',
96
            ),
96
            ),
97
        );
97
        );
98
 
98
 
99
    var $output;
99
    var $output;
100
 
-
 
101
    // }}}
-
 
102
    // {{{ constructor
-
 
103
 
100
 
104
    /**
101
    /**
105
     * PEAR_Command_Test constructor.
102
     * PEAR_Command_Test constructor.
106
     *
103
     *
107
     * @access public
104
     * @access public
108
     */
105
     */
109
    function PEAR_Command_Test(&$ui, &$config)
106
    function __construct(&$ui, &$config)
110
    {
107
    {
111
        parent::PEAR_Command_Common($ui, $config);
108
        parent::__construct($ui, $config);
112
    }
109
    }
113
 
-
 
114
    // }}}
-
 
115
    // {{{ doRunTests()
-
 
116
 
110
 
117
    function doRunTests($command, $options, $params)
111
    function doRunTests($command, $options, $params)
118
    {
112
    {
119
        if (isset($options['phpunit']) && isset($options['tapoutput'])) {
113
        if (isset($options['phpunit']) && isset($options['tapoutput'])) {
120
            return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time');
114
            return $this->raiseError('ERROR: cannot use both --phpunit and --tapoutput at the same time');
121
        }
115
        }
-
 
116
 
122
        require_once 'PEAR/Common.php';
117
        require_once 'PEAR/Common.php';
123
        require_once 'PEAR/RunTest.php';
-
 
124
        require_once 'System.php';
118
        require_once 'System.php';
125
        $log = new PEAR_Common;
119
        $log = new PEAR_Common;
126
        $log->ui = &$this->ui; // slightly hacky, but it will work
120
        $log->ui = &$this->ui; // slightly hacky, but it will work
127
        $run = new PEAR_RunTest($log, $options);
-
 
128
        $tests = array();
121
        $tests = array();
129
        if (isset($options['recur'])) {
122
        $depth = isset($options['recur']) ? 14 : 1;
130
            $depth = 4;
-
 
131
        } else {
-
 
132
            $depth = 1;
-
 
133
        }
123
 
134
        if (!count($params)) {
124
        if (!count($params)) {
135
            $params[] = '.';
125
            $params[] = '.';
136
        }
126
        }
-
 
127
 
137
        if (isset($options['package'])) {
128
        if (isset($options['package'])) {
138
            $oldparams = $params;
129
            $oldparams = $params;
139
            $params = array();
130
            $params = array();
140
            $reg = &$this->config->getRegistry();
131
            $reg = &$this->config->getRegistry();
141
            foreach ($oldparams as $param) {
132
            foreach ($oldparams as $param) {
142
                $pname = $reg->parsePackageName($param, $this->config->get('default_channel'));
133
                $pname = $reg->parsePackageName($param, $this->config->get('default_channel'));
143
                if (PEAR::isError($pname)) {
134
                if (PEAR::isError($pname)) {
144
                    return $this->raiseError($pname);
135
                    return $this->raiseError($pname);
145
                }
136
                }
-
 
137
 
146
                $package = &$reg->getPackage($pname['package'], $pname['channel']);
138
                $package = &$reg->getPackage($pname['package'], $pname['channel']);
147
                if (!$package) {
139
                if (!$package) {
148
                    return PEAR::raiseError('Unknown package "' .
140
                    return PEAR::raiseError('Unknown package "' .
149
                        $reg->parsedPackageNameToString($pname) . '"');
141
                        $reg->parsedPackageNameToString($pname) . '"');
150
                }
142
                }
-
 
143
 
151
                $filelist = $package->getFilelist();
144
                $filelist = $package->getFilelist();
152
                foreach ($filelist as $name => $atts) {
145
                foreach ($filelist as $name => $atts) {
153
                    if (isset($atts['role']) && $atts['role'] != 'test') {
146
                    if (isset($atts['role']) && $atts['role'] != 'test') {
154
                        continue;
147
                        continue;
155
                    }
148
                    }
156
                    if (isset($options['phpunit'])) {
-
 
-
 
149
 
157
                        if (!preg_match('/AllTests\.php$/i', $name)) {
150
                    if (isset($options['phpunit']) && preg_match('/AllTests\.php\\z/i', $name)) {
158
                            continue;
151
                        $params[] = $atts['installed_as'];
159
                        }
152
                        continue;
160
                    } else {
-
 
161
                        if (!preg_match('/\.phpt$/', $name)) {
153
                    } elseif (!preg_match('/\.phpt\\z/', $name)) {
162
                            continue;
154
                        continue;
163
                        }
-
 
164
                    }
155
                    }
165
                    $params[] = $atts['installed_as'];
156
                    $params[] = $atts['installed_as'];
166
                }
157
                }
167
            }
158
            }
168
        }
159
        }
-
 
160
 
169
        foreach ($params as $p) {
161
        foreach ($params as $p) {
170
            if (is_dir($p)) {
162
            if (is_dir($p)) {
171
                if (isset($options['phpunit'])) {
163
                if (isset($options['phpunit'])) {
172
                    $dir = System::find(array($p, '-type', 'f',
164
                    $dir = System::find(array($p, '-type', 'f',
173
                                                '-maxdepth', $depth,
165
                                                '-maxdepth', $depth,
174
                                                '-name', 'AllTests.php'));
166
                                                '-name', 'AllTests.php'));
175
                } else {
167
                    if (count($dir)) {
176
                    $dir = System::find(array($p, '-type', 'f',
168
                        foreach ($dir as $p) {
177
                                                '-maxdepth', $depth,
169
                            $p = realpath($p);
-
 
170
                            if (!count($tests) ||
-
 
171
                                  (count($tests) && strlen($p) < strlen($tests[0]))) {
-
 
172
                                // this is in a higher-level directory, use this one instead.
178
                                                '-name', '*.phpt'));
173
                                $tests = array($p);
-
 
174
                            }
-
 
175
                        }
-
 
176
                    }
-
 
177
                    continue;
179
                }
178
                }
-
 
179
 
180
                $tests = array_merge($tests, $dir);
180
                $args  = array($p, '-type', 'f', '-name', '*.phpt');
181
            } else {
181
            } else {
182
                if (isset($options['phpunit'])) {
182
                if (isset($options['phpunit'])) {
183
                    if (!preg_match('/AllTests\.php$/i', $p)) {
183
                    if (preg_match('/AllTests\.php\\z/i', $p)) {
184
                        continue;
184
                        $p = realpath($p);
185
                    }
-
 
186
                    $tests[] = $p;
185
                        if (!count($tests) ||
187
                } else {
-
 
188
                    if (!file_exists($p)) {
186
                              (count($tests) && strlen($p) < strlen($tests[0]))) {
189
                        if (!preg_match('/\.phpt$/', $p)) {
187
                            // this is in a higher-level directory, use this one instead.
190
                            $p .= '.phpt';
188
                            $tests = array($p);
191
                        }
189
                        }
192
                        $dir = System::find(array(dirname($p), '-type', 'f',
-
 
193
                                                    '-maxdepth', $depth,
-
 
194
                                                    '-name', $p));
-
 
195
                        $tests = array_merge($tests, $dir);
-
 
196
                    } else {
-
 
197
                        $tests[] = $p;
-
 
198
                    }
190
                    }
-
 
191
                    continue;
-
 
192
                }
-
 
193
 
-
 
194
                if (file_exists($p) && preg_match('/\.phpt$/', $p)) {
-
 
195
                    $tests[] = $p;
-
 
196
                    continue;
199
                }
197
                }
-
 
198
 
-
 
199
                if (!preg_match('/\.phpt\\z/', $p)) {
-
 
200
                    $p .= '.phpt';
-
 
201
                }
-
 
202
 
-
 
203
                $args  = array(dirname($p), '-type', 'f', '-name', $p);
-
 
204
            }
-
 
205
 
-
 
206
            if (!isset($options['recur'])) {
-
 
207
                $args[] = '-maxdepth';
-
 
208
                $args[] = 1;
200
            }
209
            }
-
 
210
 
-
 
211
            $dir   = System::find($args);
-
 
212
            $tests = array_merge($tests, $dir);
201
        }
213
        }
-
 
214
 
202
        $ini_settings = '';
215
        $ini_settings = '';
203
        if (isset($options['ini'])) {
216
        if (isset($options['ini'])) {
204
            $ini_settings .= $options['ini'];
217
            $ini_settings .= $options['ini'];
205
        }
218
        }
-
 
219
 
206
        if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) {
220
        if (isset($_ENV['TEST_PHP_INCLUDE_PATH'])) {
207
            $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}";
221
            $ini_settings .= " -d include_path={$_ENV['TEST_PHP_INCLUDE_PATH']}";
208
        }
222
        }
-
 
223
 
209
        if ($ini_settings) {
224
        if ($ini_settings) {
210
            $this->ui->outputData('Using INI settings: "' . $ini_settings . '"');
225
            $this->ui->outputData('Using INI settings: "' . $ini_settings . '"');
211
        }
226
        }
-
 
227
 
212
        $skipped = $passed = $failed = array();
228
        $skipped = $passed = $failed = array();
-
 
229
        $tests_count = count($tests);
213
        $this->ui->outputData('Running ' . count($tests) . ' tests', $command);
230
        $this->ui->outputData('Running ' . $tests_count . ' tests', $command);
214
        $start = time();
231
        $start = time();
215
        if (isset($options['realtimelog'])) {
232
        if (isset($options['realtimelog']) && file_exists('run-tests.log')) {
216
            if (file_exists('run-tests.log')) {
-
 
217
                unlink('run-tests.log');
233
            unlink('run-tests.log');
218
            }
-
 
219
        }
234
        }
-
 
235
 
220
        if (isset($options['tapoutput'])) {
236
        if (isset($options['tapoutput'])) {
221
            $tap = '1..' . count($tests) . "\n";
237
            $tap = '1..' . $tests_count . "\n";
222
        }
238
        }
-
 
239
 
-
 
240
        require_once 'PEAR/RunTest.php';
-
 
241
        $run = new PEAR_RunTest($log, $options);
-
 
242
        $run->tests_count = $tests_count;
-
 
243
 
-
 
244
        if (isset($options['coverage']) && extension_loaded('xdebug')){
-
 
245
            $run->xdebug_loaded = true;
-
 
246
        } else {
-
 
247
            $run->xdebug_loaded = false;
-
 
248
        }
-
 
249
 
223
        $i = 1;
250
        $j = $i = 1;
224
        foreach ($tests as $t) {
251
        foreach ($tests as $t) {
225
            if (isset($options['realtimelog'])) {
252
            if (isset($options['realtimelog'])) {
226
                $fp = @fopen('run-tests.log', 'a');
253
                $fp = @fopen('run-tests.log', 'a');
227
                if ($fp) {
254
                if ($fp) {
228
                    fwrite($fp, "Running test $t...");
255
                    fwrite($fp, "Running test [$i / $tests_count] $t...");
229
                    fclose($fp);
256
                    fclose($fp);
230
                }
257
                }
231
            }
258
            }
232
            PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
259
            PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
-
 
260
            if (isset($options['phpunit'])) {
-
 
261
                $result = $run->runPHPUnit($t, $ini_settings);
-
 
262
            } else {
233
            $result = $run->run($t, $ini_settings);
263
                $result = $run->run($t, $ini_settings, $j);
-
 
264
            }
234
            PEAR::staticPopErrorHandling();
265
            PEAR::staticPopErrorHandling();
235
            if (PEAR::isError($result)) {
266
            if (PEAR::isError($result)) {
236
                $this->ui->log($result->getMessage());
267
                $this->ui->log($result->getMessage());
237
                continue;
268
                continue;
238
            }
269
            }
-
 
270
 
239
            if (isset($options['tapoutput'])) {
271
            if (isset($options['tapoutput'])) {
240
                $tap .= $result[0] . ' ' . $i . $result[1] . "\n";
272
                $tap .= $result[0] . ' ' . $i . $result[1] . "\n";
241
                $i++;
-
 
242
                continue;
273
                continue;
243
            }
274
            }
-
 
275
 
244
            if (isset($options['realtimelog'])) {
276
            if (isset($options['realtimelog'])) {
245
                $fp = @fopen('run-tests.log', 'a');
277
                $fp = @fopen('run-tests.log', 'a');
246
                if ($fp) {
278
                if ($fp) {
247
                    fwrite($fp, "$result\n");
279
                    fwrite($fp, "$result\n");
248
                    fclose($fp);
280
                    fclose($fp);
249
                }
281
                }
250
            }
282
            }
-
 
283
 
251
            if ($result == 'FAILED') {
284
            if ($result == 'FAILED') {
252
            	$failed[] = $t;
285
                $failed[] = $t;
253
            }
286
            }
254
            if ($result == 'PASSED') {
287
            if ($result == 'PASSED') {
255
            	$passed[] = $t;
288
                $passed[] = $t;
256
            }
289
            }
257
            if ($result == 'SKIPPED') {
290
            if ($result == 'SKIPPED') {
258
            	$skipped[] = $t;
291
                $skipped[] = $t;
259
            }
292
            }
-
 
293
 
-
 
294
            $j++;
260
        }
295
        }
-
 
296
 
261
        $total = date('i:s', time() - $start);
297
        $total = date('i:s', time() - $start);
262
        if (isset($options['tapoutput'])) {
298
        if (isset($options['tapoutput'])) {
263
            $fp = @fopen('run-tests.log', 'w');
299
            $fp = @fopen('run-tests.log', 'w');
264
            if ($fp) {
300
            if ($fp) {
265
                fwrite($fp, $tap, strlen($tap));
301
                fwrite($fp, $tap, strlen($tap));
266
                fclose($fp);
302
                fclose($fp);
267
                $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') .
303
                $this->ui->outputData('wrote TAP-format log to "' .realpath('run-tests.log') .
268
                    '"', $command);
304
                    '"', $command);
269
            }
305
            }
270
        } else {
306
        } else {
271
            if (count($failed)) {
307
            if (count($failed)) {
272
                $output = "TOTAL TIME: $total\n";
308
                $output = "TOTAL TIME: $total\n";
273
                $output .= count($passed) . " PASSED TESTS\n";
309
                $output .= count($passed) . " PASSED TESTS\n";
274
                $output .= count($skipped) . " SKIPPED TESTS\n";
310
                $output .= count($skipped) . " SKIPPED TESTS\n";
275
        		$output .= count($failed) . " FAILED TESTS:\n";
311
                $output .= count($failed) . " FAILED TESTS:\n";
276
            	foreach ($failed as $failure) {
312
                foreach ($failed as $failure) {
277
            		$output .= $failure . "\n";
313
                    $output .= $failure . "\n";
278
            	}
-
 
279
                if (isset($options['realtimelog'])) {
-
 
280
                    $fp = @fopen('run-tests.log', 'a');
-
 
281
                } else {
-
 
282
                    $fp = @fopen('run-tests.log', 'w');
-
 
283
                }
314
                }
-
 
315
 
-
 
316
                $mode = isset($options['realtimelog']) ? 'a' : 'w';
-
 
317
                $fp   = @fopen('run-tests.log', $mode);
-
 
318
 
284
                if ($fp) {
319
                if ($fp) {
285
                    fwrite($fp, $output, strlen($output));
320
                    fwrite($fp, $output, strlen($output));
286
                    fclose($fp);
321
                    fclose($fp);
287
                    $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command);
322
                    $this->ui->outputData('wrote log to "' . realpath('run-tests.log') . '"', $command);
288
                }
323
                }
289
            } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) {
324
            } elseif (file_exists('run-tests.log') && !is_dir('run-tests.log')) {
290
                @unlink('run-tests.log');
325
                @unlink('run-tests.log');
291
            }
326
            }
292
        }
327
        }
293
        $this->ui->outputData('TOTAL TIME: ' . $total);
328
        $this->ui->outputData('TOTAL TIME: ' . $total);
294
        $this->ui->outputData(count($passed) . ' PASSED TESTS', $command);
329
        $this->ui->outputData(count($passed) . ' PASSED TESTS', $command);
295
        $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command);
330
        $this->ui->outputData(count($skipped) . ' SKIPPED TESTS', $command);
296
        if (count($failed)) {
331
        if (count($failed)) {
297
    		$this->ui->outputData(count($failed) . ' FAILED TESTS:', $command);
332
            $this->ui->outputData(count($failed) . ' FAILED TESTS:', $command);
298
        	foreach ($failed as $failure) {
333
            foreach ($failed as $failure) {
299
        		$this->ui->outputData($failure, $command);
334
                $this->ui->outputData($failure, $command);
300
        	}
335
            }
301
        }
336
        }
-
 
337
 
302
 
338
        if (count($failed) == 0) {
-
 
339
            return true;
-
 
340
        }
303
        return true;
341
        return $this->raiseError('Some tests failed');
304
    }
-
 
305
    // }}}
342
    }
306
}
-
 
307
 
-
 
308
?>
343
}