README 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. == MediaWiki PHPUnit Tests ==
  2. The unit tests for MediaWiki are implemented using the PHPUnit testing
  3. framework and require PHPUnit to run.
  4. === WARNING ===
  5. Some of the unit tests are DESTRUCTIVE and WILL ALTER YOUR WIKI'S CONTENTS.
  6. DO NOT RUN THESE TESTS ON A PRODUCTION SYSTEM OR ON ANY SYSTEM WHERE YOU NEED
  7. TO RETAIN YOUR DATA.
  8. == Installation ==
  9. If you used composer to install MediaWiki's dependencies PHPUnit will already be available, unless
  10. you explicitly specified the --no-dev flag during the install. In this case just run "composer update".
  11. Otherwise follow the installation instructions in the
  12. PHPUnit Manual at:
  13. https://phpunit.de/manual/current/en/installation.html
  14. == Running tests ==
  15. The tests are run from your operating system's command line.
  16. Ensure that you are in the tests/phpunit directory of your MediaWiki
  17. installation.
  18. On Unix-like operating systems, the tests runs are controlled with a makefile.
  19. Run command:
  20. make help
  21. for a full list of options for running tests.
  22. On Windows-family operating systems, run the 'run-tests.bat' batch file.
  23. === Writing tests ===
  24. A guide to writing PHP unit tests for MediaWiki can be found at:
  25. https://www.mediawiki.org/wiki/Manual:PHP_unit_testing