wiki.techinc.nl/tests/phpunit
Dayllan Maza e8063a0846 Send a cookie with IP/IP-Range blocks when blocking logged-out users
A cookie will be set when ip users try to edit and their IP has been
blocked or if they try to create an account and the block prevents
account creation

This feature is disabled by default and can be enabled by
setting the new $wgCookieSetOnIpBlock config variable to true.

Note: this is meant to discourage vandals that try to avoid blocks by
switching their ip address while editing anonymously.

Bug: T152462
Change-Id: I0b78a5e174bcd882edea39e868a08f9a347f5aba
2018-05-24 00:48:05 -04:00
..
data Merge "resourceloader: Add test case for ResourceLoader::getLessCompiler" 2018-05-20 08:50:48 +00:00
docs
includes Send a cookie with IP/IP-Range blocks when blocking logged-out users 2018-05-24 00:48:05 -04:00
languages Crimean Tatar/crh transliteration odds and ends 2018-05-22 14:59:55 -04:00
maintenance Enable deleteAutoPatrolLogs to delete pre-2011 autopatrol logs as well 2018-05-24 01:19:01 +02: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 API: Introduce "templated parameters" 2018-05-16 16:19:31 -04: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 build: Updating mediawiki/mediawiki-codesniffer to 16.0.0 2018-02-17 13:29:13 +01:00
MediaWikiTestCase.php phpunit: Clear job queues in MediaWikiTestCase::setUp() 2018-04-24 00:46:19 +01: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 resourceloader: Apply safemode to startup module registry 2018-05-19 22:14:33 +02: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