1DokuWiki Test Suite 2============================================================================= 3 4Content of this document: 5 6 * Requirements 7 * Installation of PHPUnit via Pear 8 * Running all Tests 9 * Create new Tests 10 * Known Bad Tests 11 * TODO for test framework 12 13 14 15Requirements 16----------------------------------------------------------------------------- 17 18 * PHP Unit 3.7 19 20 21Installation of PHPUnit via Pear 22----------------------------------------------------------------------------- 23 24 > pear config-set auto_discover 1 25 > pear upgrade 26 > pear install pear.phpunit.de/PHPUnit 27 28 29Running all Tests 30----------------------------------------------------------------------------- 31 32 > cd _testing/ 33 > phpunit 34 35 36Create new Tests 37----------------------------------------------------------------------------- 38 39To create a test for DokuWiki, create a *.test.php file within the tests/ 40folder. Please respect the folder structure and naming convention. Inside the 41file, implement a class, extending 'DokuWikiTest'. Every method, starting 42with 'test' will be called as a test (e.g. 'testIfThisIsValid'); 43 44 45Known Bad Tests 46----------------------------------------------------------------------------- 47 48Every test should be green on every run but the following were broken after 49the PHPUnit migration and are disabled by default: 50 51 * inc/DifferenceEngine (removed FS#2161, FS#2223) 52 * inc/html_hilight (runkit) 53 * inc/indexer_idx_indexlengths (fs dependencies) 54 * inc/mail_send (integration test) 55 * inc/parser/parser_formatting 56 * inc/parser/xhtml_htmlphp (runkit) 57 * inc/parser/xhtml_links 58 59 60TODO for the test framework 61----------------------------------------------------------------------------- 62 63 * test cross platform compatibility: especially test windows 64 * update http://www.dokuwiki.org/devel:unittesting 65 * optional: add helper methods to TestRequest for easy form submission 66 * createForm(), ... 67