bwanders / dokuwiki-strata

Strata - a Semi-Structured Data plugin for Dokuwiki
https://www.dokuwiki.org/plugin:strata
17 stars 8 forks source link

Adjusted test code to actual DokuWiki testing framework. #34

Closed lpaulsen93 closed 7 years ago

lpaulsen93 commented 7 years ago

I noticed that if the strata plugin is installed I cannot run my ODT plugin unit tests with the command phpunit --group plugin_odt as usual. It runs into an error. If I deinstall the strata plugin then it runs fine again.

The reason seems to be that the strata test code is totally out-dated.

This pull-request updates the strata test code to the actual test framework. A lot of the tests fail with an assertion but they so far run properly and do not fail because of not matching the test framework (e.g. wrong setup or non-existing functions called [assertEqual() was replaced by assertEquals()]).

The files/functions for grouping tests are completly obsolete. Groups are formed within the comment syntax, e.g. see @group plugin_strata in the comment blocks preceding the classes.

If you only want to run your strata plugin test use:

I won't fix the assertions, that's your work I guess :smile: But it would by nice if you colud merge it because as mentioned above actually the strata plugin breaks unit testing for other plugins too.

bwanders commented 7 years ago

Thanks!