History log of /dokuwiki/_test/core/DokuWikiTest.php (Results 1 – 25 of 27)
Revision Date Author Comments
# f577a2ef 25-Nov-2024 Andreas Gohr <andi@splitbrain.org>

Allow tests to expect log messages


# dfa189a8 22-Jun-2022 Andreas Gohr <andi@splitbrain.org>

avoid timeouts in tests

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 seem

avoid timeouts in tests

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.

show more ...


# e937d004 24-Oct-2021 Satoshi Sahara <sahara.satoshi@gmail.com>

typo


# 3366d071 04-Feb-2021 Andreas Gohr <andi@splitbrain.org>

fix PHP8 errors in tests

These were problems within the tests itself. There are many more
problems in the actual code.


# 1c33cec3 04-Feb-2021 Andreas Gohr <andi@splitbrain.org>

add needed type hints for phpunit8

This will break a lot of plugin tests, but can't be avoided


# bd9dab32 04-Feb-2021 Andreas Gohr <andi@splitbrain.org>

remove unnamespaced php unit wrapper


# 4af692c2 15-Oct-2019 Andreas Gohr <gohr@cosmocode.de>

Avoid flaky tests by waiting full seconds

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

Avoid flaky tests by waiting full seconds

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.

show more ...


# 3a7140a1 15-Jun-2018 Andreas Gohr <andi@splitbrain.org>

moved plugin controller to Extension namespace


# cbb44eab 15-Jun-2018 Andreas Gohr <andi@splitbrain.org>

deprecated trigger_event() in favor of a static method on Event


# e1d9dcc8 15-Jun-2018 Andreas Gohr <andi@splitbrain.org>

First go at moving the plugin classes into their own namespace


# ccc4c71c 19-Feb-2019 Andreas Gohr <andi@splitbrain.org>

adjusted the Input clases for PSR2

They are now in their own namespace.


# d7e6f391 18-May-2018 Andreas Gohr <andi@splitbrain.org>

Merge branch 'testinit' into psr2-config

* testinit:
reset config directory for every test


# 1c0be3eb 18-May-2018 Andreas Gohr <andi@splitbrain.org>

reset config directory for every test

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 di

reset config directory for every test

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.

show more ...


# 836f6efb 04-May-2018 Andreas Gohr <andi@splitbrain.org>

add methods to test interal properties

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 n

add methods to test interal properties

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...

show more ...


# 210ff133 13-Apr-2018 Andreas Gohr <andi@splitbrain.org>

make testing of inaccessible methods easier

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 me

make testing of inaccessible methods easier

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.

show more ...


# 3c1490b3 06-Mar-2018 Phy <git@phy25.com>

remove createMock & createPartialMock polyfill, dropping support for PHPUnit 5.7-


# 01ef6ea2 12-Mar-2017 Andreas Gohr <andi@splitbrain.org>

support phpunit 5 and 6

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

support phpunit 5 and 6

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.

show more ...


# e3eb1d75 14-Feb-2017 Michael Grosse <grosse@cosmocode.de>

PHPUnit 6 now only supports namespaced classes

However those classes are already supported in PHP 5.7 so we can switch
to them without breaking backward-compatibility.


# d732617b 01-Dec-2016 Andreas Gohr <gohr@cosmocode.de>

new helper method waitForTick() in DokuWikiTest

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

new helper method waitForTick() in DokuWikiTest

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.

show more ...


# db5867f1 09-Aug-2016 Andreas Gohr <andi@splitbrain.org>

fix tests for newer PHPUnit. fixes #1643

getMock is deprecated in new PHPUnit versions and createMock is the
recommended replacement. However that one is not available in older
PHPUnit releases. Sin

fix tests for newer PHPUnit. fixes #1643

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.

show more ...


# f48e16ab 19-Mar-2016 Gerrit Uitslag <klapinklapin@gmail.com>

reload some config settings after the conf reset in DokuWikiTest::setUp


# 79e79377 07-Jan-2015 Andreas Gohr <gohr@cosmocode.de>

Remove error supression for file_exists()

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 PH

Remove error supression for file_exists()

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.

show more ...


# c01cdb70 06-Mar-2014 Christopher Smith <chris@jalakai.co.uk>

Fix unittests broken by previous two commits

Mostly this is for unit tests which use of \$_SERVER['REMOTE_USER']

It ensures the reference/alias connection between \$INPUT->server
and \$_SERVER is r

Fix unittests broken by previous two commits

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.

show more ...


# 4f708321 20-Dec-2012 Michael Hamann <michael@content-space.de>

Remove global $Indexer, clear index in the testing system instead


# e3ab6fc5 28-Jul-2012 Michael Hamann <michael@content-space.de>

Fixed and extended PHPDoc comments and added additional @var comments


12