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

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