diff options
author | Tobias Sarnowski <tobias@trustedco.de> | 2012-04-16 17:36:10 +0000 |
---|---|---|
committer | Tobias Sarnowski <tobias@trustedco.de> | 2012-04-16 17:36:10 +0000 |
commit | ae4cb5963676bdd9415f1b6652942ed462026fc5 (patch) | |
tree | 8762ec07c78dae50d3dfc183d15a438166a11855 | |
parent | 1101eda89fdb3b8cc5f5fe0dc2c2ac4c1705508e (diff) | |
download | rpg-ae4cb5963676bdd9415f1b6652942ed462026fc5.tar.gz rpg-ae4cb5963676bdd9415f1b6652942ed462026fc5.tar.bz2 |
unified unit and integration tests
-rw-r--r-- | _testing/README | 6 | ||||
-rw-r--r-- | _testing/bootstrap.php (renamed from _testing/inttests.php) | 95 | ||||
-rw-r--r-- | _testing/conf/acl.auth.php.dist (renamed from _testing/inttests.conf/acl.auth.php.dist) | 0 | ||||
-rw-r--r-- | _testing/conf/acronyms.conf (renamed from _testing/inttests.conf/acronyms.conf) | 0 | ||||
-rw-r--r-- | _testing/conf/dokuwiki.php (renamed from _testing/inttests.conf/dokuwiki.php) | 0 | ||||
-rw-r--r-- | _testing/conf/entities.conf (renamed from _testing/inttests.conf/entities.conf) | 0 | ||||
-rw-r--r-- | _testing/conf/interwiki.conf (renamed from _testing/inttests.conf/interwiki.conf) | 0 | ||||
-rw-r--r-- | _testing/conf/license.php (renamed from _testing/inttests.conf/license.php) | 0 | ||||
-rw-r--r-- | _testing/conf/local.php (renamed from _testing/inttests.conf/local.php) | 0 | ||||
-rw-r--r-- | _testing/conf/local.php.dist (renamed from _testing/inttests.conf/local.php.dist) | 0 | ||||
-rw-r--r-- | _testing/conf/mediameta.php (renamed from _testing/inttests.conf/mediameta.php) | 0 | ||||
-rw-r--r-- | _testing/conf/mime.conf (renamed from _testing/inttests.conf/mime.conf) | 0 | ||||
-rw-r--r-- | _testing/conf/mysql.conf.php.example (renamed from _testing/inttests.conf/mysql.conf.php.example) | 0 | ||||
-rw-r--r-- | _testing/conf/plugins.local.php (renamed from _testing/inttests.conf/plugins.local.php) | 0 | ||||
-rw-r--r-- | _testing/conf/plugins.required.php (renamed from _testing/inttests.conf/plugins.required.php) | 0 | ||||
-rw-r--r-- | _testing/conf/scheme.conf (renamed from _testing/inttests.conf/scheme.conf) | 0 | ||||
-rw-r--r-- | _testing/conf/smileys.conf (renamed from _testing/inttests.conf/smileys.conf) | 0 | ||||
-rw-r--r-- | _testing/conf/users.auth.php.dist (renamed from _testing/inttests.conf/users.auth.php.dist) | 0 | ||||
-rw-r--r-- | _testing/conf/wordblock.conf (renamed from _testing/inttests.conf/wordblock.conf) | 0 | ||||
-rw-r--r-- | _testing/data/_dummy (renamed from _testing/inttests.data/_dummy) | 0 | ||||
-rw-r--r-- | _testing/data/attic/_dummy (renamed from _testing/inttests.data/attic/_dummy) | 0 | ||||
-rw-r--r-- | _testing/data/cache/_dummy (renamed from _testing/inttests.data/cache/_dummy) | 0 | ||||
-rw-r--r-- | _testing/data/deleted.files (renamed from _testing/inttests.data/deleted.files) | 0 | ||||
-rw-r--r-- | _testing/data/index/_dummy (renamed from _testing/inttests.data/index/_dummy) | 0 | ||||
-rw-r--r-- | _testing/data/locks/_dummy (renamed from _testing/inttests.data/locks/_dummy) | 0 | ||||
-rw-r--r-- | _testing/data/media/wiki/dokuwiki-128.png (renamed from _testing/inttests.data/media/wiki/dokuwiki-128.png) | bin | 33615 -> 33615 bytes | |||
-rw-r--r-- | _testing/data/media_attic/_dummy (renamed from _testing/inttests.data/media_attic/_dummy) | 0 | ||||
-rw-r--r-- | _testing/data/media_meta/_dummy (renamed from _testing/inttests.data/media_meta/_dummy) | 0 | ||||
-rw-r--r-- | _testing/data/meta/_dummy (renamed from _testing/inttests.data/meta/_dummy) | 0 | ||||
-rw-r--r-- | _testing/data/pages/wiki/dokuwiki.txt (renamed from _testing/inttests.data/pages/wiki/dokuwiki.txt) | 0 | ||||
-rw-r--r-- | _testing/data/pages/wiki/syntax.txt (renamed from _testing/inttests.data/pages/wiki/syntax.txt) | 0 | ||||
-rw-r--r-- | _testing/data/security.png (renamed from _testing/inttests.data/security.png) | bin | 7917 -> 7917 bytes | |||
-rw-r--r-- | _testing/data/security.xcf (renamed from _testing/inttests.data/security.xcf) | bin | 12093 -> 12093 bytes | |||
-rw-r--r-- | _testing/data/tmp/_dummy (renamed from _testing/inttests.data/tmp/_dummy) | 0 | ||||
-rw-r--r-- | _testing/inttests.xml | 16 | ||||
-rw-r--r-- | _testing/phpunit.xml | 12 | ||||
-rw-r--r-- | _testing/tests/inc/auth_aclcheck.test.php (renamed from _testing/unittests/inc/auth_aclcheck.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/auth_admincheck.test.php (renamed from _testing/unittests/inc/auth_admincheck.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/auth_nameencode.test.php (renamed from _testing/unittests/inc/auth_nameencode.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/auth_password.cputest.php (renamed from _testing/unittests/inc/auth_password.cputest.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/common_cleanText.test.php (renamed from _testing/unittests/inc/common_cleanText.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/common_clientip.test.php (renamed from _testing/unittests/inc/common_clientip.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/common_obfuscate.test.php (renamed from _testing/unittests/inc/common_obfuscate.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/common_pagetemplate.test.php (renamed from _testing/unittests/inc/common_pagetemplate.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/form_form.test.php (renamed from _testing/unittests/inc/form_form.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/init_fullpath.test.php (renamed from _testing/unittests/inc/init_fullpath.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/init_getbaseurl.test.php (renamed from _testing/unittests/inc/init_getbaseurl.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/ixr_library_date.test.php (renamed from _testing/unittests/inc/ixr_library_date.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/ixr_library_ixr_message.test.php (renamed from _testing/unittests/inc/ixr_library_ixr_message.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/mail_isvalid.test.php (renamed from _testing/unittests/inc/mail_isvalid.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/mail_quoted_printable_encode.test.php (renamed from _testing/unittests/inc/mail_quoted_printable_encode.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/pageutils_clean_id.test.php (renamed from _testing/unittests/inc/pageutils_clean_id.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/pageutils_getid.test.php (renamed from _testing/unittests/inc/pageutils_getid.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/pageutils_resolve_id.test.php (renamed from _testing/unittests/inc/pageutils_resolve_id.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/pageutils_resolve_pageid.test.php (renamed from _testing/unittests/inc/pageutils_resolve_pageid.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/lexer.test.php (renamed from _testing/unittests/inc/parser/lexer.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser.inc.php (renamed from _testing/unittests/inc/parser/parser.inc.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_eol.test.php (renamed from _testing/unittests/inc/parser/parser_eol.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_footnote.test.php (renamed from _testing/unittests/inc/parser/parser_footnote.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_headers.test.php (renamed from _testing/unittests/inc/parser/parser_headers.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_i18n.test.php (renamed from _testing/unittests/inc/parser/parser_i18n.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_links.test.php (renamed from _testing/unittests/inc/parser/parser_links.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_lists.test.php (renamed from _testing/unittests/inc/parser/parser_lists.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_preformatted.test.php (renamed from _testing/unittests/inc/parser/parser_preformatted.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_quote.test.php (renamed from _testing/unittests/inc/parser/parser_quote.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_quotes.test.php (renamed from _testing/unittests/inc/parser/parser_quotes.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_replacements.test.php (renamed from _testing/unittests/inc/parser/parser_replacements.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_table.test.php (renamed from _testing/unittests/inc/parser/parser_table.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parser/parser_unformatted.test.php (renamed from _testing/unittests/inc/parser/parser_unformatted.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/parserutils_set_metadata_during_rendering.test.php (renamed from _testing/unittests/inc/parserutils_set_metadata_during_rendering.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/remote.test.php (renamed from _testing/unittests/inc/remote.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/safefn.test.php (renamed from _testing/unittests/inc/safefn.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/search/data/ns1/ns3/page3.txt (renamed from _testing/unittests/inc/search/data/ns1/ns3/page3.txt) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/search/data/ns1/page1.txt (renamed from _testing/unittests/inc/search/data/ns1/page1.txt) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/search/data/ns1/page2.txt (renamed from _testing/unittests/inc/search/data/ns1/page2.txt) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/search/data/ns2/nopage.ext (renamed from _testing/unittests/inc/search/data/ns2/nopage.ext) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/search/data/ns2/page1.txt (renamed from _testing/unittests/inc/search/data/ns2/page1.txt) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/search/search.test.php (renamed from _testing/unittests/inc/search/search.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/utf8_correctidx.test.php (renamed from _testing/unittests/inc/utf8_correctidx.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/utf8_html.test.php (renamed from _testing/unittests/inc/utf8_html.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/utf8_kanaromaji.txt (renamed from _testing/unittests/inc/utf8_kanaromaji.txt) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/utf8_romanize.cputest.php (renamed from _testing/unittests/inc/utf8_romanize.cputest.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/utf8_stripspecials.test.php (renamed from _testing/unittests/inc/utf8_stripspecials.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/utf8_substr.test.php (renamed from _testing/unittests/inc/utf8_substr.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/utf8_unicode.test.php (renamed from _testing/unittests/inc/utf8_unicode.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/inc/utf8_utf16be.test.php (renamed from _testing/unittests/inc/utf8_utf16be.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/css_css_compress.test.php (renamed from _testing/unittests/lib/exe/css_css_compress.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/css_css_loadfile.test.php (renamed from _testing/unittests/lib/exe/css_css_loadfile.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress.test.php (renamed from _testing/unittests/lib/exe/js_js_compress.test.php) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentMultiline-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentMultiline-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentMultiline-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentMultiline-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentSingleLine-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentSingleLine-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-CommentSingleLine-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-CommentSingleLine-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-RegexpBackslash-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-RegexpBackslash-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-RegexpBackslash-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-RegexpBackslash-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-RegexpSimple-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-RegexpSimple-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-RegexpSimple-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-RegexpSimple-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-RegexpString-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-RegexpString-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-RegexpString-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-RegexpString-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StatementDoWhile-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StatementDoWhile-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StatementDoWhile-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StatementDoWhile-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StatementForIn-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StatementForIn-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StatementForIn-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StatementForIn-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StatementNew-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StatementNew-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StatementNew-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StatementNew-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js) | 0 | ||||
-rw-r--r-- | _testing/tests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js (renamed from _testing/unittests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js) | 0 | ||||
-rw-r--r-- | _testing/tests/testing/inttests_basic.test.php (renamed from _testing/inttests/inttests_basic.test.php) | 5 | ||||
-rw-r--r-- | _testing/tests/testing/inttests_globals.test.php | 22 | ||||
-rw-r--r-- | _testing/tests/testing/inttests_hooks.test.php (renamed from _testing/inttests/inttests_hooks.test.php) | 5 | ||||
-rw-r--r-- | _testing/tests/testing/inttests_scope.test.php (renamed from _testing/inttests/inttests_scope.test.php) | 5 | ||||
-rw-r--r-- | _testing/unittests/bootstrap.php | 10 |
130 files changed, 122 insertions, 54 deletions
diff --git a/_testing/README b/_testing/README index e94580d9a..124e9ae8d 100644 --- a/_testing/README +++ b/_testing/README @@ -28,9 +28,7 @@ Bad tests are tests that do not run out of the box. * inc/parser/xhtml_links -==== Integration Tests ==== - > phpunit -c inttests.xml - ==== TODO ==== - * integration tests (+plugins) + * plugin tests + * cross platform compatible: especially test windows (hint: tmp dir location) diff --git a/_testing/inttests.php b/_testing/bootstrap.php index 4eb1f0286..ef86be870 100644 --- a/_testing/inttests.php +++ b/_testing/bootstrap.php @@ -1,7 +1,6 @@ <?php - /** - * Integration Test Library for DokuWiki + * Test Library for DokuWiki * * Simulates a full DokuWiki HTTP Request and allows * runtime inspection. @@ -26,31 +25,95 @@ function rcopy($destdir, $source) { } } +// helper for recursive rmdir()/unlink() +function rdelete($target) { + if (!is_dir($target)) { + unlink($target); + } else { + $dh = dir($target); + while (false !== ($entry = $dh->read())) { + if ($entry == '.' || $entry == '..') { + continue; + } + rdelete("$target/$entry"); + } + $dh->close(); + rmdir($target); + } +} + +// helper to append text to a file +function fappend($file, $text) { + $fh = fopen($file, 'a'); + fwrite($fh, $text); + fclose($fh); +} + +// if someone really wants a special handling during tests +define('DOKU_UNITTEST', true); +define('SIMPLE_TEST', true); + +// basic behaviours +error_reporting(E_ALL); +set_time_limit(0); +ini_set('memory_limit','2048M'); + +// default plugins +$default_plugins = array( + 'acl', + 'action', + 'admin', + 'config', + 'info', + 'plugin', + 'popularity', + 'remote', + 'revert', + 'safefnrecode', + 'syntax', + 'usermanager' +); + // prepare temporary directories define('DOKU_INC', dirname(dirname(__FILE__)).'/'); -define('TMP_DIR', '/tmp/dwinttests-'.microtime(true)); -define('DOKU_CONF', TMP_DIR.'/inttests.conf/'); -define('DOKU_PLUGIN', TMP_DIR.'/plugins/'); -define('DOKU_TMP_DATA', TMP_DIR.'/inttests.data/'); +define('TMP_DIR', '/tmp/dwtests-'.microtime(true)); +define('DOKU_CONF', TMP_DIR.'/conf/'); +define('DOKU_TMP_DATA', TMP_DIR.'/data/'); // create temp directories mkdir(TMP_DIR); -mkdir(DOKU_PLUGIN); - -// populate default dirs -rcopy(TMP_DIR, dirname(__FILE__).'/inttests.conf'); -rcopy(TMP_DIR, dirname(__FILE__).'/inttests.data'); // cleanup dir after exit register_shutdown_function(function() { - // TODO delete recursive tmp dir +// rdelete(TMP_DIR); }); -// TODO disable all non-default plugins in config -// TODO if plugin test, enable plugin -// TODO load plugin descriptor and enable dependent plugins +// populate default dirs +rcopy(TMP_DIR, dirname(__FILE__).'/conf'); +rcopy(TMP_DIR, dirname(__FILE__).'/data'); + +// disable all non-default plugins by default +$dh = dir(DOKU_INC.'lib/plugins/'); +while (false !== ($entry = $dh->read())) { + if ($entry == '.' || $entry == '..' || $entry == 'index.html') { + continue; + } + + if (substr($entry, strlen($entry) - 4) == '.php') { + $plugin = substr($entry, 0, strlen($entry) - 4); + } else { + $plugin = $entry; + } + + if (!in_array($plugin, $default_plugins)) { + // disable this plugin + fappend(DOKU_CONF.'plugins.local.php', "\$plugins['$plugin'] = 0;\n"); + } +} +$dh->close(); -// TODO set global variables, phpunit will restore them for every test (test that) +// TODO setup default global variables +$_SERVER['REMOTE_ADDR'] = '173.194.69.138'; // load dw require_once(DOKU_INC.'inc/init.php'); diff --git a/_testing/inttests.conf/acl.auth.php.dist b/_testing/conf/acl.auth.php.dist index 14344d778..14344d778 100644 --- a/_testing/inttests.conf/acl.auth.php.dist +++ b/_testing/conf/acl.auth.php.dist diff --git a/_testing/inttests.conf/acronyms.conf b/_testing/conf/acronyms.conf index 058e85550..058e85550 100644 --- a/_testing/inttests.conf/acronyms.conf +++ b/_testing/conf/acronyms.conf diff --git a/_testing/inttests.conf/dokuwiki.php b/_testing/conf/dokuwiki.php index 5c0b28114..5c0b28114 100644 --- a/_testing/inttests.conf/dokuwiki.php +++ b/_testing/conf/dokuwiki.php diff --git a/_testing/inttests.conf/entities.conf b/_testing/conf/entities.conf index be9ed6d40..be9ed6d40 100644 --- a/_testing/inttests.conf/entities.conf +++ b/_testing/conf/entities.conf diff --git a/_testing/inttests.conf/interwiki.conf b/_testing/conf/interwiki.conf index 28d603de2..28d603de2 100644 --- a/_testing/inttests.conf/interwiki.conf +++ b/_testing/conf/interwiki.conf diff --git a/_testing/inttests.conf/license.php b/_testing/conf/license.php index 89728ab57..89728ab57 100644 --- a/_testing/inttests.conf/license.php +++ b/_testing/conf/license.php diff --git a/_testing/inttests.conf/local.php b/_testing/conf/local.php index 3de30ee21..3de30ee21 100644 --- a/_testing/inttests.conf/local.php +++ b/_testing/conf/local.php diff --git a/_testing/inttests.conf/local.php.dist b/_testing/conf/local.php.dist index 0397954f4..0397954f4 100644 --- a/_testing/inttests.conf/local.php.dist +++ b/_testing/conf/local.php.dist diff --git a/_testing/inttests.conf/mediameta.php b/_testing/conf/mediameta.php index 0428a4b88..0428a4b88 100644 --- a/_testing/inttests.conf/mediameta.php +++ b/_testing/conf/mediameta.php diff --git a/_testing/inttests.conf/mime.conf b/_testing/conf/mime.conf index 24529b06c..24529b06c 100644 --- a/_testing/inttests.conf/mime.conf +++ b/_testing/conf/mime.conf diff --git a/_testing/inttests.conf/mysql.conf.php.example b/_testing/conf/mysql.conf.php.example index 94bc14e1f..94bc14e1f 100644 --- a/_testing/inttests.conf/mysql.conf.php.example +++ b/_testing/conf/mysql.conf.php.example diff --git a/_testing/inttests.conf/plugins.local.php b/_testing/conf/plugins.local.php index 00e8c10be..00e8c10be 100644 --- a/_testing/inttests.conf/plugins.local.php +++ b/_testing/conf/plugins.local.php diff --git a/_testing/inttests.conf/plugins.required.php b/_testing/conf/plugins.required.php index 26eb8888b..26eb8888b 100644 --- a/_testing/inttests.conf/plugins.required.php +++ b/_testing/conf/plugins.required.php diff --git a/_testing/inttests.conf/scheme.conf b/_testing/conf/scheme.conf index 88cb3c44d..88cb3c44d 100644 --- a/_testing/inttests.conf/scheme.conf +++ b/_testing/conf/scheme.conf diff --git a/_testing/inttests.conf/smileys.conf b/_testing/conf/smileys.conf index 80daed57a..80daed57a 100644 --- a/_testing/inttests.conf/smileys.conf +++ b/_testing/conf/smileys.conf diff --git a/_testing/inttests.conf/users.auth.php.dist b/_testing/conf/users.auth.php.dist index 6576eeb5f..6576eeb5f 100644 --- a/_testing/inttests.conf/users.auth.php.dist +++ b/_testing/conf/users.auth.php.dist diff --git a/_testing/inttests.conf/wordblock.conf b/_testing/conf/wordblock.conf index fe451f278..fe451f278 100644 --- a/_testing/inttests.conf/wordblock.conf +++ b/_testing/conf/wordblock.conf diff --git a/_testing/inttests.data/_dummy b/_testing/data/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/_dummy +++ b/_testing/data/_dummy diff --git a/_testing/inttests.data/attic/_dummy b/_testing/data/attic/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/attic/_dummy +++ b/_testing/data/attic/_dummy diff --git a/_testing/inttests.data/cache/_dummy b/_testing/data/cache/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/cache/_dummy +++ b/_testing/data/cache/_dummy diff --git a/_testing/inttests.data/deleted.files b/_testing/data/deleted.files index d034e1d5b..d034e1d5b 100644 --- a/_testing/inttests.data/deleted.files +++ b/_testing/data/deleted.files diff --git a/_testing/inttests.data/index/_dummy b/_testing/data/index/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/index/_dummy +++ b/_testing/data/index/_dummy diff --git a/_testing/inttests.data/locks/_dummy b/_testing/data/locks/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/locks/_dummy +++ b/_testing/data/locks/_dummy diff --git a/_testing/inttests.data/media/wiki/dokuwiki-128.png b/_testing/data/media/wiki/dokuwiki-128.png Binary files differindex b2306ac95..b2306ac95 100644 --- a/_testing/inttests.data/media/wiki/dokuwiki-128.png +++ b/_testing/data/media/wiki/dokuwiki-128.png diff --git a/_testing/inttests.data/media_attic/_dummy b/_testing/data/media_attic/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/media_attic/_dummy +++ b/_testing/data/media_attic/_dummy diff --git a/_testing/inttests.data/media_meta/_dummy b/_testing/data/media_meta/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/media_meta/_dummy +++ b/_testing/data/media_meta/_dummy diff --git a/_testing/inttests.data/meta/_dummy b/_testing/data/meta/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/meta/_dummy +++ b/_testing/data/meta/_dummy diff --git a/_testing/inttests.data/pages/wiki/dokuwiki.txt b/_testing/data/pages/wiki/dokuwiki.txt index e6fac5b65..e6fac5b65 100644 --- a/_testing/inttests.data/pages/wiki/dokuwiki.txt +++ b/_testing/data/pages/wiki/dokuwiki.txt diff --git a/_testing/inttests.data/pages/wiki/syntax.txt b/_testing/data/pages/wiki/syntax.txt index 0b5480949..0b5480949 100644 --- a/_testing/inttests.data/pages/wiki/syntax.txt +++ b/_testing/data/pages/wiki/syntax.txt diff --git a/_testing/inttests.data/security.png b/_testing/data/security.png Binary files differindex c4f1a9771..c4f1a9771 100644 --- a/_testing/inttests.data/security.png +++ b/_testing/data/security.png diff --git a/_testing/inttests.data/security.xcf b/_testing/data/security.xcf Binary files differindex 990287830..990287830 100644 --- a/_testing/inttests.data/security.xcf +++ b/_testing/data/security.xcf diff --git a/_testing/inttests.data/tmp/_dummy b/_testing/data/tmp/_dummy index e69de29bb..e69de29bb 100644 --- a/_testing/inttests.data/tmp/_dummy +++ b/_testing/data/tmp/_dummy diff --git a/_testing/inttests.xml b/_testing/inttests.xml deleted file mode 100644 index cb216e59a..000000000 --- a/_testing/inttests.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<phpunit - bootstrap="inttests.php" - convertNoticesToExceptions="false"> - - <testsuites> - <testsuite name="DokuWiki Integration Tests"> - <directory suffix=".test.php">inttests/</directory> - </testsuite> - <testsuite name="Plugin Integration Tests"> - <directory suffix=".inttest.php">../lib/plugins/*/_testing</directory> - </testsuite> - </testsuites> - - -</phpunit> diff --git a/_testing/phpunit.xml b/_testing/phpunit.xml index 0b5089526..9991b7d92 100644 --- a/_testing/phpunit.xml +++ b/_testing/phpunit.xml @@ -1,13 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <phpunit - bootstrap="unittests/bootstrap.php" - convertNoticesToExceptions="false"> + bootstrap="bootstrap.php" + convertNoticesToExceptions="false" + backupGlobals="yes" + colors="true"> <testsuites> - <testsuite name="Default Unit Tests"> - <directory suffix=".test.php">unittests/</directory> + <testsuite name="DokuWiki Tests"> + <directory suffix=".test.php">tests/</directory> </testsuite> - <testsuite name="Plugin tests"> + <testsuite name="Plugin Tests"> <directory suffix=".test.php">../lib/plugins/*/_testing</directory> </testsuite> </testsuites> diff --git a/_testing/unittests/inc/auth_aclcheck.test.php b/_testing/tests/inc/auth_aclcheck.test.php index 53c6f03f1..53c6f03f1 100644 --- a/_testing/unittests/inc/auth_aclcheck.test.php +++ b/_testing/tests/inc/auth_aclcheck.test.php diff --git a/_testing/unittests/inc/auth_admincheck.test.php b/_testing/tests/inc/auth_admincheck.test.php index b3ead7d23..b3ead7d23 100644 --- a/_testing/unittests/inc/auth_admincheck.test.php +++ b/_testing/tests/inc/auth_admincheck.test.php diff --git a/_testing/unittests/inc/auth_nameencode.test.php b/_testing/tests/inc/auth_nameencode.test.php index 12a333f66..12a333f66 100644 --- a/_testing/unittests/inc/auth_nameencode.test.php +++ b/_testing/tests/inc/auth_nameencode.test.php diff --git a/_testing/unittests/inc/auth_password.cputest.php b/_testing/tests/inc/auth_password.cputest.php index 4c922d0e3..4c922d0e3 100644 --- a/_testing/unittests/inc/auth_password.cputest.php +++ b/_testing/tests/inc/auth_password.cputest.php diff --git a/_testing/unittests/inc/common_cleanText.test.php b/_testing/tests/inc/common_cleanText.test.php index 68e70e2ea..68e70e2ea 100644 --- a/_testing/unittests/inc/common_cleanText.test.php +++ b/_testing/tests/inc/common_cleanText.test.php diff --git a/_testing/unittests/inc/common_clientip.test.php b/_testing/tests/inc/common_clientip.test.php index a2dfb84ed..a2dfb84ed 100644 --- a/_testing/unittests/inc/common_clientip.test.php +++ b/_testing/tests/inc/common_clientip.test.php diff --git a/_testing/unittests/inc/common_obfuscate.test.php b/_testing/tests/inc/common_obfuscate.test.php index d7c947117..d7c947117 100644 --- a/_testing/unittests/inc/common_obfuscate.test.php +++ b/_testing/tests/inc/common_obfuscate.test.php diff --git a/_testing/unittests/inc/common_pagetemplate.test.php b/_testing/tests/inc/common_pagetemplate.test.php index c4cc58295..c4cc58295 100644 --- a/_testing/unittests/inc/common_pagetemplate.test.php +++ b/_testing/tests/inc/common_pagetemplate.test.php diff --git a/_testing/unittests/inc/form_form.test.php b/_testing/tests/inc/form_form.test.php index 6bc042ba6..6bc042ba6 100644 --- a/_testing/unittests/inc/form_form.test.php +++ b/_testing/tests/inc/form_form.test.php diff --git a/_testing/unittests/inc/init_fullpath.test.php b/_testing/tests/inc/init_fullpath.test.php index 23a627617..23a627617 100644 --- a/_testing/unittests/inc/init_fullpath.test.php +++ b/_testing/tests/inc/init_fullpath.test.php diff --git a/_testing/unittests/inc/init_getbaseurl.test.php b/_testing/tests/inc/init_getbaseurl.test.php index 0cc31f4fd..0cc31f4fd 100644 --- a/_testing/unittests/inc/init_getbaseurl.test.php +++ b/_testing/tests/inc/init_getbaseurl.test.php diff --git a/_testing/unittests/inc/ixr_library_date.test.php b/_testing/tests/inc/ixr_library_date.test.php index 8b5f3e83e..8b5f3e83e 100644 --- a/_testing/unittests/inc/ixr_library_date.test.php +++ b/_testing/tests/inc/ixr_library_date.test.php diff --git a/_testing/unittests/inc/ixr_library_ixr_message.test.php b/_testing/tests/inc/ixr_library_ixr_message.test.php index 9de3d61aa..9de3d61aa 100644 --- a/_testing/unittests/inc/ixr_library_ixr_message.test.php +++ b/_testing/tests/inc/ixr_library_ixr_message.test.php diff --git a/_testing/unittests/inc/mail_isvalid.test.php b/_testing/tests/inc/mail_isvalid.test.php index e4eaf8d78..e4eaf8d78 100644 --- a/_testing/unittests/inc/mail_isvalid.test.php +++ b/_testing/tests/inc/mail_isvalid.test.php diff --git a/_testing/unittests/inc/mail_quoted_printable_encode.test.php b/_testing/tests/inc/mail_quoted_printable_encode.test.php index 8228d007b..8228d007b 100644 --- a/_testing/unittests/inc/mail_quoted_printable_encode.test.php +++ b/_testing/tests/inc/mail_quoted_printable_encode.test.php diff --git a/_testing/unittests/inc/pageutils_clean_id.test.php b/_testing/tests/inc/pageutils_clean_id.test.php index 0c9c41da1..0c9c41da1 100644 --- a/_testing/unittests/inc/pageutils_clean_id.test.php +++ b/_testing/tests/inc/pageutils_clean_id.test.php diff --git a/_testing/unittests/inc/pageutils_getid.test.php b/_testing/tests/inc/pageutils_getid.test.php index 41cb4bd14..41cb4bd14 100644 --- a/_testing/unittests/inc/pageutils_getid.test.php +++ b/_testing/tests/inc/pageutils_getid.test.php diff --git a/_testing/unittests/inc/pageutils_resolve_id.test.php b/_testing/tests/inc/pageutils_resolve_id.test.php index e8cec2aef..e8cec2aef 100644 --- a/_testing/unittests/inc/pageutils_resolve_id.test.php +++ b/_testing/tests/inc/pageutils_resolve_id.test.php diff --git a/_testing/unittests/inc/pageutils_resolve_pageid.test.php b/_testing/tests/inc/pageutils_resolve_pageid.test.php index defbd2a69..defbd2a69 100644 --- a/_testing/unittests/inc/pageutils_resolve_pageid.test.php +++ b/_testing/tests/inc/pageutils_resolve_pageid.test.php diff --git a/_testing/unittests/inc/parser/lexer.test.php b/_testing/tests/inc/parser/lexer.test.php index 4fccc6688..4fccc6688 100644 --- a/_testing/unittests/inc/parser/lexer.test.php +++ b/_testing/tests/inc/parser/lexer.test.php diff --git a/_testing/unittests/inc/parser/parser.inc.php b/_testing/tests/inc/parser/parser.inc.php index 06c314ac6..06c314ac6 100644 --- a/_testing/unittests/inc/parser/parser.inc.php +++ b/_testing/tests/inc/parser/parser.inc.php diff --git a/_testing/unittests/inc/parser/parser_eol.test.php b/_testing/tests/inc/parser/parser_eol.test.php index 03569bb62..03569bb62 100644 --- a/_testing/unittests/inc/parser/parser_eol.test.php +++ b/_testing/tests/inc/parser/parser_eol.test.php diff --git a/_testing/unittests/inc/parser/parser_footnote.test.php b/_testing/tests/inc/parser/parser_footnote.test.php index f3b5ddf56..f3b5ddf56 100644 --- a/_testing/unittests/inc/parser/parser_footnote.test.php +++ b/_testing/tests/inc/parser/parser_footnote.test.php diff --git a/_testing/unittests/inc/parser/parser_headers.test.php b/_testing/tests/inc/parser/parser_headers.test.php index d7e5f0e42..d7e5f0e42 100644 --- a/_testing/unittests/inc/parser/parser_headers.test.php +++ b/_testing/tests/inc/parser/parser_headers.test.php diff --git a/_testing/unittests/inc/parser/parser_i18n.test.php b/_testing/tests/inc/parser/parser_i18n.test.php index 096f2e227..096f2e227 100644 --- a/_testing/unittests/inc/parser/parser_i18n.test.php +++ b/_testing/tests/inc/parser/parser_i18n.test.php diff --git a/_testing/unittests/inc/parser/parser_links.test.php b/_testing/tests/inc/parser/parser_links.test.php index 529efac6e..529efac6e 100644 --- a/_testing/unittests/inc/parser/parser_links.test.php +++ b/_testing/tests/inc/parser/parser_links.test.php diff --git a/_testing/unittests/inc/parser/parser_lists.test.php b/_testing/tests/inc/parser/parser_lists.test.php index e4ef1f83e..e4ef1f83e 100644 --- a/_testing/unittests/inc/parser/parser_lists.test.php +++ b/_testing/tests/inc/parser/parser_lists.test.php diff --git a/_testing/unittests/inc/parser/parser_preformatted.test.php b/_testing/tests/inc/parser/parser_preformatted.test.php index f7a01a7e5..f7a01a7e5 100644 --- a/_testing/unittests/inc/parser/parser_preformatted.test.php +++ b/_testing/tests/inc/parser/parser_preformatted.test.php diff --git a/_testing/unittests/inc/parser/parser_quote.test.php b/_testing/tests/inc/parser/parser_quote.test.php index 4d77f2a39..4d77f2a39 100644 --- a/_testing/unittests/inc/parser/parser_quote.test.php +++ b/_testing/tests/inc/parser/parser_quote.test.php diff --git a/_testing/unittests/inc/parser/parser_quotes.test.php b/_testing/tests/inc/parser/parser_quotes.test.php index b2dae1039..b2dae1039 100644 --- a/_testing/unittests/inc/parser/parser_quotes.test.php +++ b/_testing/tests/inc/parser/parser_quotes.test.php diff --git a/_testing/unittests/inc/parser/parser_replacements.test.php b/_testing/tests/inc/parser/parser_replacements.test.php index f0367dac0..f0367dac0 100644 --- a/_testing/unittests/inc/parser/parser_replacements.test.php +++ b/_testing/tests/inc/parser/parser_replacements.test.php diff --git a/_testing/unittests/inc/parser/parser_table.test.php b/_testing/tests/inc/parser/parser_table.test.php index 96789c38c..96789c38c 100644 --- a/_testing/unittests/inc/parser/parser_table.test.php +++ b/_testing/tests/inc/parser/parser_table.test.php diff --git a/_testing/unittests/inc/parser/parser_unformatted.test.php b/_testing/tests/inc/parser/parser_unformatted.test.php index 7608cfd1c..7608cfd1c 100644 --- a/_testing/unittests/inc/parser/parser_unformatted.test.php +++ b/_testing/tests/inc/parser/parser_unformatted.test.php diff --git a/_testing/unittests/inc/parserutils_set_metadata_during_rendering.test.php b/_testing/tests/inc/parserutils_set_metadata_during_rendering.test.php index 93914264c..93914264c 100644 --- a/_testing/unittests/inc/parserutils_set_metadata_during_rendering.test.php +++ b/_testing/tests/inc/parserutils_set_metadata_during_rendering.test.php diff --git a/_testing/unittests/inc/remote.test.php b/_testing/tests/inc/remote.test.php index e4efeb0d2..e4efeb0d2 100644 --- a/_testing/unittests/inc/remote.test.php +++ b/_testing/tests/inc/remote.test.php diff --git a/_testing/unittests/inc/safefn.test.php b/_testing/tests/inc/safefn.test.php index 17169770b..17169770b 100644 --- a/_testing/unittests/inc/safefn.test.php +++ b/_testing/tests/inc/safefn.test.php diff --git a/_testing/unittests/inc/search/data/ns1/ns3/page3.txt b/_testing/tests/inc/search/data/ns1/ns3/page3.txt index e69de29bb..e69de29bb 100644 --- a/_testing/unittests/inc/search/data/ns1/ns3/page3.txt +++ b/_testing/tests/inc/search/data/ns1/ns3/page3.txt diff --git a/_testing/unittests/inc/search/data/ns1/page1.txt b/_testing/tests/inc/search/data/ns1/page1.txt index e69de29bb..e69de29bb 100644 --- a/_testing/unittests/inc/search/data/ns1/page1.txt +++ b/_testing/tests/inc/search/data/ns1/page1.txt diff --git a/_testing/unittests/inc/search/data/ns1/page2.txt b/_testing/tests/inc/search/data/ns1/page2.txt index e69de29bb..e69de29bb 100644 --- a/_testing/unittests/inc/search/data/ns1/page2.txt +++ b/_testing/tests/inc/search/data/ns1/page2.txt diff --git a/_testing/unittests/inc/search/data/ns2/nopage.ext b/_testing/tests/inc/search/data/ns2/nopage.ext index e69de29bb..e69de29bb 100644 --- a/_testing/unittests/inc/search/data/ns2/nopage.ext +++ b/_testing/tests/inc/search/data/ns2/nopage.ext diff --git a/_testing/unittests/inc/search/data/ns2/page1.txt b/_testing/tests/inc/search/data/ns2/page1.txt index e69de29bb..e69de29bb 100644 --- a/_testing/unittests/inc/search/data/ns2/page1.txt +++ b/_testing/tests/inc/search/data/ns2/page1.txt diff --git a/_testing/unittests/inc/search/search.test.php b/_testing/tests/inc/search/search.test.php index 7ed14d476..7ed14d476 100644 --- a/_testing/unittests/inc/search/search.test.php +++ b/_testing/tests/inc/search/search.test.php diff --git a/_testing/unittests/inc/utf8_correctidx.test.php b/_testing/tests/inc/utf8_correctidx.test.php index 694cf9a21..694cf9a21 100644 --- a/_testing/unittests/inc/utf8_correctidx.test.php +++ b/_testing/tests/inc/utf8_correctidx.test.php diff --git a/_testing/unittests/inc/utf8_html.test.php b/_testing/tests/inc/utf8_html.test.php index 9f40514fc..9f40514fc 100644 --- a/_testing/unittests/inc/utf8_html.test.php +++ b/_testing/tests/inc/utf8_html.test.php diff --git a/_testing/unittests/inc/utf8_kanaromaji.txt b/_testing/tests/inc/utf8_kanaromaji.txt index d6bf51e95..d6bf51e95 100644 --- a/_testing/unittests/inc/utf8_kanaromaji.txt +++ b/_testing/tests/inc/utf8_kanaromaji.txt diff --git a/_testing/unittests/inc/utf8_romanize.cputest.php b/_testing/tests/inc/utf8_romanize.cputest.php index 66e3b76c9..66e3b76c9 100644 --- a/_testing/unittests/inc/utf8_romanize.cputest.php +++ b/_testing/tests/inc/utf8_romanize.cputest.php diff --git a/_testing/unittests/inc/utf8_stripspecials.test.php b/_testing/tests/inc/utf8_stripspecials.test.php index 10d4eab48..10d4eab48 100644 --- a/_testing/unittests/inc/utf8_stripspecials.test.php +++ b/_testing/tests/inc/utf8_stripspecials.test.php diff --git a/_testing/unittests/inc/utf8_substr.test.php b/_testing/tests/inc/utf8_substr.test.php index b4684d4a2..b4684d4a2 100644 --- a/_testing/unittests/inc/utf8_substr.test.php +++ b/_testing/tests/inc/utf8_substr.test.php diff --git a/_testing/unittests/inc/utf8_unicode.test.php b/_testing/tests/inc/utf8_unicode.test.php index bbd41ae99..bbd41ae99 100644 --- a/_testing/unittests/inc/utf8_unicode.test.php +++ b/_testing/tests/inc/utf8_unicode.test.php diff --git a/_testing/unittests/inc/utf8_utf16be.test.php b/_testing/tests/inc/utf8_utf16be.test.php index 3a939a660..3a939a660 100644 --- a/_testing/unittests/inc/utf8_utf16be.test.php +++ b/_testing/tests/inc/utf8_utf16be.test.php diff --git a/_testing/unittests/lib/exe/css_css_compress.test.php b/_testing/tests/lib/exe/css_css_compress.test.php index 3fbb5820d..3fbb5820d 100644 --- a/_testing/unittests/lib/exe/css_css_compress.test.php +++ b/_testing/tests/lib/exe/css_css_compress.test.php diff --git a/_testing/unittests/lib/exe/css_css_loadfile.test.php b/_testing/tests/lib/exe/css_css_loadfile.test.php index c1706c4a4..c1706c4a4 100644 --- a/_testing/unittests/lib/exe/css_css_loadfile.test.php +++ b/_testing/tests/lib/exe/css_css_loadfile.test.php diff --git a/_testing/unittests/lib/exe/js_js_compress.test.php b/_testing/tests/lib/exe/js_js_compress.test.php index c6b0a2d2c..c6b0a2d2c 100644 --- a/_testing/unittests/lib/exe/js_js_compress.test.php +++ b/_testing/tests/lib/exe/js_js_compress.test.php diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js b/_testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js index 771dc1640..771dc1640 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js b/_testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js index 7d6a5346e..7d6a5346e 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes1-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js b/_testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js index a59f1b774..a59f1b774 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js b/_testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js index caa2fdca2..caa2fdca2 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentInDoubleQuotes2-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js b/_testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js index 845c59bdf..845c59bdf 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js b/_testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js index b2696cb98..b2696cb98 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes1-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js b/_testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js index 0459a4891..0459a4891 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js b/_testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js index 21b6a410e..21b6a410e 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentInSingleQuotes2-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentMultiline-in.js b/_testing/tests/lib/exe/js_js_compress/test-CommentMultiline-in.js index b9d16a7bd..b9d16a7bd 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentMultiline-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentMultiline-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentMultiline-out.js b/_testing/tests/lib/exe/js_js_compress/test-CommentMultiline-out.js index 8eed2e57a..8eed2e57a 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentMultiline-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentMultiline-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentSingleLine-in.js b/_testing/tests/lib/exe/js_js_compress/test-CommentSingleLine-in.js index 302d7160b..302d7160b 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentSingleLine-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentSingleLine-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-CommentSingleLine-out.js b/_testing/tests/lib/exe/js_js_compress/test-CommentSingleLine-out.js index 8eed2e57a..8eed2e57a 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-CommentSingleLine-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-CommentSingleLine-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js b/_testing/tests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js index afc824762..afc824762 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-IfThenElseBraces-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js b/_testing/tests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js index 2a982a98e..2a982a98e 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-IfThenElseBraces-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js b/_testing/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js index 79d10775e..79d10775e 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js b/_testing/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js index b087c42fc..b087c42fc 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-IfThenElseNoBraces-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-RegexpBackslash-in.js b/_testing/tests/lib/exe/js_js_compress/test-RegexpBackslash-in.js index 503e07283..503e07283 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-RegexpBackslash-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-RegexpBackslash-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-RegexpBackslash-out.js b/_testing/tests/lib/exe/js_js_compress/test-RegexpBackslash-out.js index e5c83770c..e5c83770c 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-RegexpBackslash-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-RegexpBackslash-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-RegexpSimple-in.js b/_testing/tests/lib/exe/js_js_compress/test-RegexpSimple-in.js index 2741e74c2..2741e74c2 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-RegexpSimple-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-RegexpSimple-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-RegexpSimple-out.js b/_testing/tests/lib/exe/js_js_compress/test-RegexpSimple-out.js index bb530b0a1..bb530b0a1 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-RegexpSimple-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-RegexpSimple-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js b/_testing/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js index c7dbdba3d..c7dbdba3d 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js b/_testing/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js index 5c2db510b..5c2db510b 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-RegexpSimpleWhitespace-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-RegexpString-in.js b/_testing/tests/lib/exe/js_js_compress/test-RegexpString-in.js index debb983e5..debb983e5 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-RegexpString-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-RegexpString-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-RegexpString-out.js b/_testing/tests/lib/exe/js_js_compress/test-RegexpString-out.js index 92ffc7d47..92ffc7d47 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-RegexpString-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-RegexpString-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StatementDoWhile-in.js b/_testing/tests/lib/exe/js_js_compress/test-StatementDoWhile-in.js index 0c84c66ec..0c84c66ec 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StatementDoWhile-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StatementDoWhile-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StatementDoWhile-out.js b/_testing/tests/lib/exe/js_js_compress/test-StatementDoWhile-out.js index 593e9a664..593e9a664 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StatementDoWhile-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StatementDoWhile-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StatementForIn-in.js b/_testing/tests/lib/exe/js_js_compress/test-StatementForIn-in.js index 1b0aeb6ff..1b0aeb6ff 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StatementForIn-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StatementForIn-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StatementForIn-out.js b/_testing/tests/lib/exe/js_js_compress/test-StatementForIn-out.js index 95c85871e..95c85871e 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StatementForIn-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StatementForIn-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StatementNew-in.js b/_testing/tests/lib/exe/js_js_compress/test-StatementNew-in.js index 61f357f34..61f357f34 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StatementNew-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StatementNew-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StatementNew-out.js b/_testing/tests/lib/exe/js_js_compress/test-StatementNew-out.js index 0d4ff7f58..0d4ff7f58 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StatementNew-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StatementNew-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js b/_testing/tests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js index 39ffc1239..39ffc1239 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StatementSwitchCase-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js b/_testing/tests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js index e51c07371..e51c07371 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StatementSwitchCase-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js b/_testing/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js index 57fe13b90..57fe13b90 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js b/_testing/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js index 9f91fc83d..9f91fc83d 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StringDoubleQuotes-out.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js b/_testing/tests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js index bb5f9951a..bb5f9951a 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StringSingleQuotes-in.js diff --git a/_testing/unittests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js b/_testing/tests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js index f38b26544..f38b26544 100644 --- a/_testing/unittests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js +++ b/_testing/tests/lib/exe/js_js_compress/test-StringSingleQuotes-out.js diff --git a/_testing/inttests/inttests_basic.test.php b/_testing/tests/testing/inttests_basic.test.php index 78c333963..ff4b2d5c1 100644 --- a/_testing/inttests/inttests_basic.test.php +++ b/_testing/tests/testing/inttests_basic.test.php @@ -1,6 +1,9 @@ <?php -class BasicTest extends PHPUnit_Framework_TestCase { +/** + * @group integration + */ +class InttestsBasicTest extends PHPUnit_Framework_TestCase { /** * Execute the simplest possible request and expect * a dokuwiki page which obviously has the word "DokuWiki" diff --git a/_testing/tests/testing/inttests_globals.test.php b/_testing/tests/testing/inttests_globals.test.php new file mode 100644 index 000000000..40237d704 --- /dev/null +++ b/_testing/tests/testing/inttests_globals.test.php @@ -0,0 +1,22 @@ +<?php + +/** + * @group integration + */ +class InttestsGlobalsTest extends PHPUnit_Framework_TestCase { + /** + * Global variables should be restored for every test case. + */ + function testFirstRun() { + $this->assertEquals('173.194.69.138', $_SERVER['REMOTE_ADDR'], 'Global var not set as expected'); + + $_SERVER['REMOTE_ADDR'] = '127.0.0.1'; + } + + /** + * @depends testFirstRun + */ + function testSecondRun() { + $this->assertEquals('173.194.69.138', $_SERVER['REMOTE_ADDR'], 'Global var not set as expected'); + } +} diff --git a/_testing/inttests/inttests_hooks.test.php b/_testing/tests/testing/inttests_hooks.test.php index 6a31d5dc2..d3fdbd738 100644 --- a/_testing/inttests/inttests_hooks.test.php +++ b/_testing/tests/testing/inttests_hooks.test.php @@ -1,6 +1,9 @@ <?php -class HooksTest extends PHPUnit_Framework_TestCase { +/** + * @group integration + */ +class InttestsHooksTest extends PHPUnit_Framework_TestCase { function testHookTriggering() { $request = new TestRequest(); diff --git a/_testing/inttests/inttests_scope.test.php b/_testing/tests/testing/inttests_scope.test.php index e17b49fb3..80c1fbd4e 100644 --- a/_testing/inttests/inttests_scope.test.php +++ b/_testing/tests/testing/inttests_scope.test.php @@ -1,6 +1,9 @@ <?php -class ScopeTest extends PHPUnit_Framework_TestCase { +/** + * @group integration + */ +class InttestsScopeTest extends PHPUnit_Framework_TestCase { /** * It should be possible to have two test cases within one test class. */ diff --git a/_testing/unittests/bootstrap.php b/_testing/unittests/bootstrap.php deleted file mode 100644 index b5aca6204..000000000 --- a/_testing/unittests/bootstrap.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -define('DOKU_UNITTEST', true); -define('SIMPLE_TEST', true); -if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); -define('DOKU_CONF',realpath(dirname(__FILE__).'/../../conf').'/'); - -error_reporting(E_ALL); -set_time_limit(0); -ini_set('memory_limit','2048M'); |