summaryrefslogtreecommitdiff
path: root/tests/AllTests.php
blob: b1e13b497af65d85b7dd7b8e0f32ccdb7631d58a (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
49
50
51
52
53
54
55
56
<?php
/*
* To launch all tests, type the following line into the root directory
* of SemanticScuttle (where is the config.inc.php file) :
* 
*     phpunit --testdox-html tests/dox.html AllTests tests/allTests.php
* 
*  !!Check that $debugMode = false in config.inc.php to avoid unstable beahviours!!
* 
* A dox.html file will be created into the tests/ directory providing a summary
* of tests according to agile development.
* */

if (!defined('PHPUnit_MAIN_METHOD')) {
    define('PHPUnit_MAIN_METHOD', 'AllTests::main');
}

require_once 'prepare.php';
require_once 'PHPUnit/Framework/TestSuite.php';

class AllTests extends PHPUnit_Framework_TestSuite
{
    public static function main()
    {
        require_once 'PHPUnit/TextUI/TestRunner.php';
        PHPUnit_TextUI_TestRunner::run(self::suite());
    }



    public static function suite()
    {
    	$suite = new AllTests();
        $tdir = dirname(__FILE__);
    	$suite->addTestFile($tdir . '/BookmarksTest.php');
    	$suite->addTestFile($tdir . '/Tag2TagTest.php'); 
    	$suite->addTestFile($tdir . '/TagsCacheTest.php');
    	$suite->addTestFile($tdir . '/CommonDescriptionTest.php');     	
    	$suite->addTestFile($tdir . '/SearchTest.php'); 
    	$suite->addTestFile($tdir . '/TagsTest.php');
    	$suite->addTestFile($tdir . '/VoteTest.php');
        return $suite;
    }
 

 
    protected function tearDown()
    {
    }
}

if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
    AllTests::main();
}

?>