comparison vendor/pear/console_commandline/tests/AllTests.php @ 0:1e000243b222

vanilla 1.3.3 distro, I hope
author Charlie Root
date Thu, 04 Jan 2018 15:50:29 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1e000243b222
1 <?php
2
3 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5 /**
6 * This file is part of the PEAR Console_CommandLine package.
7 *
8 * PHP version 5
9 *
10 * LICENSE: This source file is subject to the MIT license that is available
11 * through the world-wide-web at the following URI:
12 * http://opensource.org/licenses/mit-license.php
13 *
14 * @category Console
15 * @package Console_CommandLine
16 * @author David JEAN LOUIS <izimobil@gmail.com>
17 * @copyright 2007 David JEAN LOUIS
18 * @license http://opensource.org/licenses/mit-license.php MIT License
19 * @version CVS: $Id$
20 * @link http://pear.php.net/package/Console_CommandLine
21 * @since File available since release 1.0.0
22 */
23
24 if (!defined('PHPUnit_MAIN_METHOD')) {
25 define('PHPUnit_MAIN_METHOD', 'Console_CommandLine_AllTests::main');
26 }
27
28 if ($fp = @fopen('PHPUnit/Autoload.php', 'r', true)) {
29 require_once 'PHPUnit/Autoload.php';
30 } elseif ($fp = @fopen('PHPUnit/Framework.php', 'r', true)) {
31 require_once 'PHPUnit/Framework.php';
32 } else {
33 die("skip could not find PHPUnit");
34 }
35 fclose($fp);
36
37 /**
38 * Console_CommandLine phpt test suite.
39 *
40 * Run all tests from the package root directory:
41 * $ phpunit Console_CommandLine_AllTests tests/AllTests.php
42 * or
43 * $ php tests/AllTests.php
44 *
45 * @category Console
46 * @package Console_CommandLine
47 * @author David JEAN LOUIS <izimobil@gmail.com>
48 * @copyright 2007 David JEAN LOUIS
49 * @license http://opensource.org/licenses/mit-license.php MIT License
50 * @version Release: @package_version@
51 * @link http://pear.php.net/package/Console_CommandLine
52 * @since Class available since release 1.0.0
53 */
54 class Console_CommandLine_AllTests
55 {
56 /**
57 * Runs the test suite
58 *
59 * @return void
60 * @static
61 */
62 public static function main()
63 {
64 PHPUnit_TextUI_TestRunner::run(self::suite());
65 }
66
67 /**
68 * Return the phpt test suite
69 *
70 * @return object the PHPUnit_Framework_TestSuite object
71 * @static
72 */
73 public static function suite()
74 {
75 return new PHPUnit_Extensions_PhptTestSuite(dirname(__FILE__));
76 }
77 }
78
79 if (PHPUnit_MAIN_METHOD == 'Console_CommandLine_AllTests::main') {
80 Console_CommandLine_AllTests::main();
81 }
82
83 ?>