Manual talk:PHP unit testing/Running the tests

Outdated instructions
The terminal instructions suggests "make databaseless" to prepare tests. Here the results. --Dereckson (talk) 02:55, 10 January 2013 (UTC) /home/dereckson/dev/mediawiki/bench/core/tests/phpunit ] make databaseless php phpunit.php --configuration /suite.xml --exclude-group Broken,ParserFuzz,Destructive,Database,Stub Could not read "/suite.xml". *** Error code 1

Stop in /usr/home/dereckson/dev/mediawiki/bench/core/tests/phpunit.
 * Actually, this is a UNIX-compliance issue in Makefile: $(shell command) is a GNU-only Make extension.
 * $PWD would work everywhere.
 * Reported at 43808 --Dereckson (talk) 03:03, 10 January 2013 (UTC)

How to run tests without a foo.suite.xml?
Most extensions don't have a foo.suite.xml file, yet somehow their tests run. Developers need to know how to run existing PHP tests without faffing about with .xml files. There are no instructions for this, and pointing phpunit.php at a particular test fails for me

Is `phpunit:entrypoint` only for integration tests?
cc @Daimona Eaytoy. Saw your email about phpunit, thanks for that. Is phpunit:entrypoint only for integration tests, or does it also run unit tests? In my opinion this documentation page is a bit unclear about that. Also are there any other entry points besides :entrypoint and :unit? Thanks. Novem Linguae (talk) 20:27, 12 July 2023 (UTC)


 * Hi! phpunit:entrypoint is meant to be used with unit tests, just like the previous phpunit.php script. For unit tests you should use composer phpunit:unit. That said, you can also run unit tests using :entrypoint (or phpunit.php) if you wish, but this is not officially supported and you may get different behaviour than running them with :unit. HTH! Daimona Eaytoy (talk) 23:35, 12 July 2023 (UTC)