3 * Copyright FusionForge Team
5 * This file is part of FusionForge.
7 * FusionForge is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published
9 * by the Free Software Foundation; either version 2 of the License,
10 * or (at your option) any later version.
12 * FusionForge is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 if (!defined('PHPUnit_MAIN_METHOD')) {
22 define('PHPUnit_MAIN_METHOD', 'AllTests::main');
25 if (!@include_once 'PHPUnit/Autoload.php') {
26 include_once 'PHPUnit/Framework.php';
27 require_once 'PHPUnit/TextUI/TestRunner.php';
30 @include_once 'PHP/Token/Stream/Autoload.php';
31 @include_once 'Text/Template/Autoload.php';
34 public static function main() {
35 PHPUnit_TextUI_TestRunner::run(self::suite());
38 public static function suite() {
39 $suite = new PHPUnit_Framework_TestSuite('PHPUnit');
42 $suite->addTestFiles(glob("unit/*/*Test.php"));
45 $suite->addTestFiles(glob("code/*/*Test.php"));