2009-10-04 01:18:49 +02:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* To launch all tests, type the following line into the root directory
|
|
|
|
* of SemanticScuttle (where is the config.inc.php file) :
|
2009-10-25 20:35:48 +01:00
|
|
|
*
|
2009-10-04 01:18:49 +02:00
|
|
|
* phpunit --testdox-html tests/dox.html AllTests tests/allTests.php
|
2009-10-25 20:35:48 +01:00
|
|
|
*
|
2009-10-04 01:18:49 +02:00
|
|
|
* !!Check that $debugMode = false in config.inc.php to avoid unstable beahviours!!
|
2009-10-25 20:35:48 +01:00
|
|
|
*
|
2009-10-04 01:18:49 +02:00
|
|
|
* 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');
|
|
|
|
}
|
|
|
|
|
2009-10-04 01:25:07 +02:00
|
|
|
require_once 'prepare.php';
|
2009-10-04 01:18:49 +02:00
|
|
|
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());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-10-24 10:01:07 +02:00
|
|
|
|
2009-10-04 01:18:49 +02:00
|
|
|
public static function suite()
|
|
|
|
{
|
2009-10-25 20:35:48 +01:00
|
|
|
$suite = new AllTests();
|
2009-10-04 01:18:49 +02:00
|
|
|
$tdir = dirname(__FILE__);
|
2009-10-25 20:35:48 +01:00
|
|
|
$suite->addTestFile($tdir . '/BookmarkTest.php');
|
|
|
|
$suite->addTestFile($tdir . '/Tag2TagTest.php');
|
|
|
|
$suite->addTestFile($tdir . '/TagsCacheTest.php');
|
|
|
|
$suite->addTestFile($tdir . '/CommonDescriptionTest.php');
|
|
|
|
$suite->addTestFile($tdir . '/SearchHistoryTest.php');
|
|
|
|
$suite->addTestFile($tdir . '/TagTest.php');
|
|
|
|
$suite->addTestFile($tdir . '/VoteTest.php');
|
2009-10-04 01:18:49 +02:00
|
|
|
return $suite;
|
|
|
|
}
|
2009-10-24 10:01:07 +02:00
|
|
|
|
2009-10-25 20:35:48 +01:00
|
|
|
|
|
|
|
|
2009-10-04 01:18:49 +02:00
|
|
|
protected function tearDown()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
|
|
|
|
AllTests::main();
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|