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

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