aboutsummaryrefslogtreecommitdiff
path: root/tests/AllTests.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-03 23:18:49 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-03 23:18:49 +0000
commitde031f043f9918424b26534d233df90b7d5c42f9 (patch)
tree679d307a234c71872194f36236cd8d38e3293955 /tests/AllTests.php
parentd5f09b7e4d802cdc2d5f3f876c48ea918c961488 (diff)
downloadsemanticscuttle-de031f043f9918424b26534d233df90b7d5c42f9.tar.gz
semanticscuttle-de031f043f9918424b26534d233df90b7d5c42f9.tar.bz2
make tests run again (though they do not pass)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@389 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'tests/AllTests.php')
-rw-r--r--tests/AllTests.php58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/AllTests.php b/tests/AllTests.php
new file mode 100644
index 0000000..1526da8
--- /dev/null
+++ b/tests/AllTests.php
@@ -0,0 +1,58 @@
+<?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 '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');
+ return $suite;
+ }
+
+ protected function setUp()
+ {
+ global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype,
+ $tableprefix, $TEMPLATES_DIR, $filetypes, $debugMode;
+ require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
+ }
+
+ protected function tearDown()
+ {
+ }
+}
+
+if (PHPUnit_MAIN_METHOD == 'AllTests::main') {
+ AllTests::main();
+}
+
+?> \ No newline at end of file