As far as I know, MediaWiki does not have a centralized router like Symfony
and Drupal have.
Therefore, you must call the "controller" directly from your test.
Also, the "controller" will typically print the result, so you would need
to capture the result with output buffering:
https://www.php.net/manual/en/function.ob-get-contents.php
This is basically what WebTestCase is doing, though it is much more elegant
because it calls the router and the result is returned rather than printed.
I hope this helps!
On Wed, Oct 2, 2019 at 5:56 AM Jeroen De Dauw <jeroendedauw(a)gmail.com>
wrote:
Hey,
I think selenium is often used for that use case
I'm explicitly looking for a PHPUnit based approach. Similar to what
Symfony provides. Surely this is possible with MediaWiki, though perhaps
not as elegantly?
Cheers
--
Jeroen De Dauw |
www.EntropyWins.wtf <https://EntropyWins.wtf> |
www.Professional.Wiki <https://Professional.Wiki>
Entrepreneur | Software Crafter | Speaker | Open Souce and Wikimedia
contributor
~=[,,_,,]:3
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l