jenkins-bot 0c045de899 Merge "registration: Let extensions add PHP version requirements" 6 years ago
..
data 2901b84c49 Merge "TemplateParser: Pass FLAG_MUSTACHELOOKUP to enable parent context access" 6 years ago
docs 7c78f7624f Clean up ExportDemoTest 10 years ago
documentation 506c2f4d57 RELEASE-NOTES: Use New/Changed/Removed pattern for Configuration section 6 years ago
includes 0c045de899 Merge "registration: Let extensions add PHP version requirements" 6 years ago
languages dbe89abb9e languages: Add coverage for 'ar' and 'ml' normalize() 6 years ago
maintenance da9d5c2188 Schema change for reading ct_tag_id instead of ct_tag 6 years ago
mocks 2d5b2f0f6a Avoid constructing Title objects in data providers 6 years ago
skins 074baa39f5 Convert HTTP links to MediaWiki.org to HTTPS 6 years ago
structure 480b653720 StructureTest::testUnitTestFileNamesEndWithTest() should not shell out 6 years ago
suites c472b7ca50 Reset services in ParserTestTopLevelSuite. 6 years ago
tests 5322107191 Reset services before every test 6 years ago
HamcrestPHPUnitIntegration.php 1a2ef35559 Add HamcrestPHPUnitIntegration trait 6 years ago
LessFileCompilationTest.php 3f1e9fa268 resourceloader: Tidy up RL to simplify ResourceLoaderEditToolbarModule 9 years ago
Makefile 6117fb244f Refactor parser tests 8 years ago
MediaWikiCoversValidator.php dafe195c28 Verify that all @covers tags are sane when running tests 7 years ago
MediaWikiLangTestCase.php 90d4f56fe4 Mass conversion of $wgContLang to service 6 years ago
MediaWikiPHPUnitCommand.php 65adc37348 Make phpunit.php less hackish, and install the listener unconditionally 6 years ago
MediaWikiPHPUnitTestListener.php 7717aa2838 Add hooks to MediaWikiPHPUnitTestListener start/endTest 6 years ago
MediaWikiTestCase.php 4da52463e3 Ensure database is setup in MediaWikiTestCase::insertPage 6 years ago
MediaWikiTestResult.php 65adc37348 Make phpunit.php less hackish, and install the listener unconditionally 6 years ago
MediaWikiTestRunner.php 65adc37348 Make phpunit.php less hackish, and install the listener unconditionally 6 years ago
PHPUnit4And6Compat.php 9d78fc2c87 tests: Support passing null to setExpectedException() in compat layer 6 years ago
README 8ef4c130e4 Update test documentation, fix broken links 9 years ago
ResourceLoaderTestCase.php 6866cfec37 Simplify PHP by using ?? and ?: 6 years ago
TODO 47623762fa format the tests/phpunit/TODO document for readability 10 years ago
bootstrap.php 950368c7e8 Remove phpunit profiling. It doesn't make any sense 9 years ago
phpunit.php 65adc37348 Make phpunit.php less hackish, and install the listener unconditionally 6 years ago
run-tests.bat 23f69f10ed Per wikitech-l discussion: Move tests from maintenance/tests/ to tests/. They're not strictly maintenance scripts, and some people want to do a selective checkout that doesn't include the tests. There's still debate on whether we should include these in the release downloads, but we had a pretty firm consensus to move this. 14 years ago
suite.xml dbe89abb9e languages: Add coverage for 'ar' and 'ml' normalize() 6 years ago

README

== MediaWiki PHPUnit Tests ==

The unit tests for MediaWiki are implemented using the PHPUnit testing
framework and require PHPUnit to run.


=== WARNING ===

Some of the unit tests are DESTRUCTIVE and WILL ALTER YOUR WIKI'S CONTENTS.

DO NOT RUN THESE TESTS ON A PRODUCTION SYSTEM OR ON ANY SYSTEM WHERE YOU NEED
TO RETAIN YOUR DATA.


== Installation ==

If you used composer to install MediaWiki's dependencies PHPUnit will already be available, unless
you explicitly specified the --no-dev flag during the install. In this case just run "composer update".

Otherwise follow the installation instructions in the
PHPUnit Manual at:

https://phpunit.de/manual/current/en/installation.html


== Running tests ==

The tests are run from your operating system's command line.

Ensure that you are in the tests/phpunit directory of your MediaWiki
installation.


On Unix-like operating systems, the tests runs are controlled with a makefile.
Run command:

make help

for a full list of options for running tests.


On Windows-family operating systems, run the 'run-tests.bat' batch file.


=== Writing tests ===

A guide to writing PHP unit tests for MediaWiki can be found at:

https://www.mediawiki.org/wiki/Manual:PHP_unit_testing