wiki.techinc.nl/tests/phpunit
Thiemo Kreuz ff84fbe8a0 resourceloader: Make various CSSMin performance optimizations and cleanups
This is called relatively often. Even small improvements might have an
impact.

I'm intentionally replacing method_exists with class_exists because the
old check looked like it was done for backwards compatibility (MediaWiki
before 1.27 did not contained the method), while in reality this code is
meant to run without MediaWiki. This is much better reflected with a
straight "if this class doesn't exist, there is no MediaWiki".

I'm intentionally using the …::class feature. Yes, this works, even if the
class is not there.

Change-Id: I7f250a7cb000105bb751f68f25c6cc1c44c8f221
2018-05-17 18:34:41 +00:00
..
data Use SPDX 3.0 license identifier 2018-03-18 18:08:22 +00:00
docs
includes resourceloader: Make various CSSMin performance optimizations and cleanups 2018-05-17 18:34:41 +00:00
languages Merge "Add Russian grammar forms to support Wikiversity" 2018-03-14 08:37:27 +00:00
maintenance Add missing "use" clause to DumpTestCase 2018-04-04 21:46:55 -07:00
mocks Fix MockMessageLocalizer 2018-03-29 12:32:00 +02:00
skins Convert HTTP links to MediaWiki.org to HTTPS 2018-04-04 18:36:10 +00:00
structure Add more checks to ApiStructureTest.php 2018-04-08 15:58:06 +03:00
suites tests: Remove some unused stuff in phpunit tests 2018-03-26 22:45:29 +00:00
tests Allow schema overrides to drop tables. 2018-03-29 21:44:47 +02:00
autoload.ide.php Setup: Deprecate StartProfiler, move default to DefaultSettings 2018-03-29 21:29:03 +00:00
bootstrap.php
HamcrestPHPUnitIntegration.php Add HamcrestPHPUnitIntegration trait 2018-04-12 19:52:05 -07:00
LessFileCompilationTest.php
Makefile
MediaWikiCoversValidator.php
MediaWikiLangTestCase.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestCase.php Reset table sequences and skip some test assertions for sqlite 2018-04-13 10:36:08 +00:00
phpunit.php Allow PHPUnit 6 optionally in require-dev 2018-04-12 20:46:56 -07:00
PHPUnit4And6Compat.php tests: Support passing null to setExpectedException() in compat layer 2018-04-15 08:10:35 +00:00
README
ResourceLoaderTestCase.php Remove $wgScriptExtension (deprecated and ignored since 1.25) 2018-04-19 01:11:23 +01:00
run-tests.bat
suite.xml
TODO

== 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