aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_test/core
Commit message (Collapse)AuthorAge
* Allow tests to expect log messagesAndreas Gohr2024-11-25
|
* added deprecated tag for phpQuery::newDocument()Andreas Gohr2023-04-05
| | | | for highlightin in IDE
* Revert "reset Event System in TestRequest"Andreas Gohr2023-02-02
| | | | | | | | | This reverts commit d09a8e055b2b1ddb55da17403441e873517de553. We have test that manipulate the event handler (eg. registering their own events on that handler) which broke with above commit. A better way needs to be found.
* reset Event System in TestRequestAndreas Gohr2023-02-01
| | | | | To better simulate requests, event registration should be redone on each simulated request.
* fix type hints for new php-dom-wrapperAndreas Gohr2022-10-27
|
* replace phpquery by php-dom-wrapper #3308Andreas Gohr2022-10-19
| | | | | | This replaces the outdated phpquery library by the newer and maintained php-dom-wrapper. Usage is similar but not a 1:1 replacement. phpQuery is left in but marked as deprecated.
* Update core code to make use of sexplode()Andreas Gohr2022-10-19
| | | | | This makes use of our own explode mechanism everywhere were we expect a fixed number of results.
* avoid timeouts in testsAndreas Gohr2022-06-22
| | | | | | | | For some reason it seems that CLI tests on github run with a execution time limit that can't be disabled by setting the appropriate ini value. Even more odd, the problem seems to exist on windows only (even though the same limit is set on both OSes). In any case, this simply resets the time limit for each test run and that seems to fix the timeout issue.
* Merge branch 'master' into revisionHandle3Gerrit Uitslag2021-12-28
|\
| * Removes use of deprecated create_function() in teests. Replaces them with ↵Oscar Merida2021-12-13
| | | | | | | | anonymous functions. Refs #3545
* | Merge branch 'master' into revisionHandle3Satoshi Sahara2021-11-12
|\|
| * Fix PHPUnit fatal errors compatibility with void.Syntaxseed2021-09-19
| |
| * Method names with leading double underscore are reserved by PHP.Syntaxseed2021-09-19
| |
* | typoSatoshi Sahara2021-10-24
|/
* fix PHP8 errors in testsAndreas Gohr2021-02-04
| | | | | These were problems within the tests itself. There are many more problems in the actual code.
* add needed type hints for phpunit8Andreas Gohr2021-02-04
| | | | This will break a lot of plugin tests, but can't be avoided
* remove unnamespaced php unit wrapperAndreas Gohr2021-02-04
|
* Fix curly brace deprecations in _test/ directory.Syntaxseed2019-10-31
|
* Avoid flaky tests by waiting full secondsAndreas Gohr2019-10-15
| | | | | | | | | | The waitForTick() method tried to be clever and return early if a second had passed since the last call already. Unfortunatel this did not work reliably in our tests and we often had failures on tests that required unique revision numbers. Pull requests for a reliable version welcome. Until the we wait a second on each call.
* moved plugin controller to Extension namespaceAndreas Gohr2019-04-20
|
* deprecated trigger_event() in favor of a static method on EventAndreas Gohr2019-04-20
|
* First go at moving the plugin classes into their own namespaceAndreas Gohr2019-04-20
|
* adjusted the Input clases for PSR2Andreas Gohr2019-02-19
| | | | They are now in their own namespace.
* Merge branch 'testinit' into psr2-configAndreas Gohr2018-05-18
|\ | | | | | | | | * testinit: reset config directory for every test
| * reset config directory for every testAndreas Gohr2018-05-18
| | | | | | | | | | | | | | | | | | Our test suite did not reset the config directory for each test class as it does for the data directory. In addition it copied all files from the main config directory over. Both may create an unpredictable state for tests. This streamlines the initialization.
* | add methods to test interal propertiesAndreas Gohr2018-05-04
|/ | | | | | You shouldn't really do this. But sometimes its so much easier to write a test that flips an internal bit than to do it poperly(tm). Better a risky test than none...
* make testing of inaccessible methods easierAndreas Gohr2018-04-13
| | | | | | | | | | While it's generally frowned upon testing privates, it can often be useful and the easier way to write tests. Eg you want to test something complicated method that is important, but you do not want to expose it directly to other classes... This new method uses reflection to make access to such methods possible from within tests without the need for intermediate classes.
* remove createMock & createPartialMock polyfill, dropping support for PHPUnit ↵Phy2018-03-06
| | | | 5.7-
* reworked notifications to the test systemAndreas Gohr2017-09-02
| | | | | No globals required anymore, somewhat more general approach to sending data to the test system. Clean access through keys.
* no need for a global output bufferAndreas Gohr2017-09-02
|
* clean up of the TestRequest objectAndreas Gohr2017-09-02
| | | | | | reformatting fixing of doc blocks making internal vars protected
* Merge branch 'testcode-secedit' of https://github.com/LarsGit223/dokuwiki ↵Andreas Gohr2017-09-02
|\ | | | | | | | | | | | | | | | | | | into LarsGit223-testcode-secedit * 'testcode-secedit' of https://github.com/LarsGit223/dokuwiki: do not hide fatal exceptions during unit tests never redirect from a redirect action undo unecessary action routing adjustments Test code for workflow 'show - sectionedit - save/cancel' (with modifications in test classes and 'send_redirect()' and 'act_dispatch()'.
| * Test code for workflow 'show - sectionedit - save/cancel' (with ↵LarsDW2232017-08-27
| | | | | | | | modifications in test classes and 'send_redirect()' and 'act_dispatch()'.
* | Merge remote-tracking branch 'origin/pr/2054' into ajaxrefactorAndreas Gohr2017-08-29
|\ \ | |/ |/| | | | | | | | | * origin/pr/2054: cleaning extracted functions added test coverage allow tests against ajax requests
| * allow tests against ajax requestsYurii K2017-07-24
| |
* | response on reviewYurii K2017-07-28
|/
* support phpunit 5 and 6Andreas Gohr2017-03-12
| | | | | | | | We still need 5 to test on old php versions, but travis uses 6 for newer PHP versions (and 5 may break on those). Luckily both versions aren't that far apart, yet. This adds a thin adapter class when running on 6.
* PHPUnit 6 now only supports namespaced classesMichael Grosse2017-03-12
| | | | | However those classes are already supported in PHP 5.7 so we can switch to them without breaking backward-compatibility.
* new helper method waitForTick() in DokuWikiTestAndreas Gohr2016-12-01
| | | | | | | | | | | | | Some of our tests require that at least one second has passed before they can continue because our revisions depend on the Unix Timestamp. Currently we use a sleep(1) for this. However this always waits a whole second, even if the next second is already much closer or maybe already here - especially when some processing has been done since the last operation. This new method waits for the next second by checking the time every 10th of a second. This might speed up some of our tests a bit.
* fix tests for newer PHPUnit. fixes #1643Andreas Gohr2016-08-09
| | | | | | | | | | getMock is deprecated in new PHPUnit versions and createMock is the recommended replacement. However that one is not available in older PHPUnit releases. Since we still support older PHP releases we have to support older PHPUnit releases as well. This add some compatibility functions to our TestCase class and replaces all calls to getMock. Tested with PHPUnit 4.6.6 and 5.5.0.
* Fixed broken links to php.net and redirecting pages to php.netAnders Sandblad2016-06-14
|
* reload some config settings after the conf reset in DokuWikiTest::setUpGerrit Uitslag2016-03-19
|
* Remove error supression for file_exists()Andreas Gohr2015-01-07
| | | | | | | In an older version of PHP a file_exists() call would issue a warning when the file did not exist. This was fixed in later PHP releases. Since we require PHP 5.3 now, there's no need to supress any error here anymore. This might even give a minor performance boost.
* fix global environment during test requestsAndreas Gohr2014-12-17
|
* Fix unittests broken by previous two commitsChristopher Smith2014-03-06
| | | | | | | | Mostly this is for unit tests which use of \$_SERVER['REMOTE_USER'] It ensures the reference/alias connection between \$INPUT->server and \$_SERVER is renewed before each test. Tests using TestRequest class will replace this \$INPUT with their own.
* fix content check test caseslisps2014-02-04
| | | | | add test case new Input check add global variables to execute
* update TestResponse class to return specific headers & status codes (with tests)Christopher Smith2013-03-22
|
* extend TestRequest class to test fetch & detail; add a test to check it doesChristopher Smith2013-03-22
|
* Remove global $Indexer, clear index in the testing system insteadMichael Hamann2012-12-20
|
* replace deprecated split calls FS#2583Andreas Gohr2012-08-26
|