summaryrefslogtreecommitdiff
path: root/inc/parser/tests/alltests.all.php
blob: 993553eb23204d6c8d44b497a5de56dcceab7438 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* @version $Id: alltests.all.php,v 1.2 2005/03/25 21:00:22 harryf Exp $
* @package Dokuwiki
* @subpackage Tests
*/
/**
* Init
*/
require_once('./testconfig.php');

define("TEST_RUNNING", true);

/**
* @package Dokuwiki
* @subpackage Tests
*/
class AllTests extends GroupTest {

    function AllTests() {
        $this->GroupTest('All Dokuwiki PHP Tests');
        $this->loadGroups();
    }

    function loadGroups() {
        if ( $d = opendir('.') ) {
            while (($file = readdir($d)) !== false) {
                if ( is_file('./'.$file) ) {
                    $farray = explode('.',$file);
                    if ( $farray[1] == 'group' ) {
                        $classname = ucfirst($farray[0]).'GroupTest';
                        require_once './'.$file;
                        $this->AddTestCase(new $classname);
                    }
                }
            }
            closedir($d);
        }
    }

}

/**
* Run the tests
*/
$test = &new AllTests();
$test->run(new HtmlReporter());
?>