wiki.techinc.nl/tests/phpunit
jdlrobson 8cd2e13363 Deprecate access of logos directly from config, introduce wgLogos
Add getAvailableLogos static method and wgLogos config variable

Longterm we'll phase out wgLogo and wgLogoHD for this more extendable
config.

wgLogoHD is marked as deprecated. wgLogo continues to function as before
when wgLogos doesn't exist to cause minimum disruption.

From now on all logos should be accessed via getAvailableLogos. Patches
in Minerva and Vector follow. See I00899c16c0325f36b671baf17e88c2b5187b3526,
I569e0d800e147eabc7852567acd140108613f074 and
I013bd0904fe8c55efa49d14e84cf06ec1412896f.

Bug: T232140
Change-Id: I66a971631c623cc94b58eb0e5e5bad804789bf1c
2020-02-04 01:56:20 +00:00
..
data TemplateParserTest: Add test case with syntax error 2020-01-29 23:15:53 +00:00
docs
documentation
includes Deprecate access of logos directly from config, introduce wgLogos 2020-02-04 01:56:20 +00:00
integration/includes Merge "Coding style: Auto-fix MediaWiki.Usage.PHPUnit*" 2020-01-10 16:59:11 +00:00
languages Merge "languages: Add @group Language to all tests related to Language for easier navigation through tests" 2020-02-03 16:41:25 +00:00
maintenance Merge "Fix TextPassDumperDatabaseTest to work with 0.11 schema" 2020-02-03 19:50:18 +00:00
mocks Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
skins
structure Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
suites Remove Preprocessor_DOM, deprecated in 1.34 2020-01-25 11:22:45 -05:00
tests
unit languages: Introduce LanguageConverterFactory 2020-02-03 11:38:03 +02:00
bootstrap.maintenance.php
bootstrap.php Allow specifying autoloaded classes for tests 2019-12-10 21:39:30 +00:00
HamcrestPHPUnitIntegration.php Add missing @param and @return to documentation 2019-11-16 13:45:55 +01:00
LessFileCompilationTest.php Replace complicated assertions with assertIsString() and such 2020-01-28 19:17:58 +00:00
Makefile
MediaWikiCliOptions.php Fix broken running tests locally in IDE 2019-11-21 16:28:12 +00:00
MediaWikiCoversValidator.php Rewrite MediaWikiCoversValidator to use @dataProvider 2019-11-27 09:16:57 +00:00
MediaWikiGroupValidator.php
MediaWikiIntegrationTestCase.php MediaWikiIntegrationTestCase: Hard-deprecate assertType() 2020-01-20 12:39:15 +00:00
MediaWikiLangTestCase.php
MediaWikiLoggerPHPUnitTestListener.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
MediaWikiPHPUnitCommand.php Show the PHPUnit help in phpunit.php --help 2019-11-25 17:19:20 +11:00
MediaWikiPHPUnitResultPrinter.php
MediaWikiPHPUnitTestListener.php Upgrade PHPUnit to version 7 2019-11-20 21:02:33 -08:00
MediaWikiTestCaseTrait.php Share assertArrayEquals with MediaWikiUnitTestCase 2020-01-07 16:05:40 -08:00
MediaWikiUnitTestCase.php Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse 2020-01-10 09:32:25 -08:00
phpunit.php phpunit: fix parameter mangling 2020-01-23 18:02:53 +01:00
PHPUnit4And6Compat.php
PHPUnit6And8Compat.php phpunit: Remove 6And8Compat trait from base classes 2019-11-21 17:42:39 +00:00
README
ResourceLoaderTestCase.php Add missing @param and @return to documentation 2019-11-16 13:45:55 +01:00
run-tests.bat
suite.xml phpunit: Drop unused enforceTimeLimit command and related settings 2020-01-22 14:12:45 -08:00

== MediaWiki PHPUnit Tests ==

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


=== WARNING ===

Some of the integration 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