wiki.techinc.nl/tests/phpunit
Geoffrey Mon 700e49dddd Unwatch link for pages in Special:Watchlist
When the 'watchlistunwatchlinks' preference option is enabled, this
adds a '×' link to each entry of the watchlist that unwatches the page
of that entry. When clicked, it changes into a '+' which can be used to
re-watch the page (effectively undoing the earlier unwatch).
When a page is unwatched, its entries and the entries of its associated
talk page (or vice versa) become translucent and are struck through.

Without JS, '×'/'+' link to action=(un)watch for the relevant page.

In addition, ChangesList classes have been modified to allow a prefixer
that adds a prefix to each line (used in this case to put the unwatch
link) and to add HTML data attributes to reliably determine the target
page of each entry. Unit tests have been updated accordingly.

Bug: T2424
Change-Id: I450b2901413d7e75c11de2a446829fdbb22d31e1
2017-08-12 19:36:29 -04:00
..
data Merge "MimeAnalyzer: Add testcases for mp3 detection" 2017-08-09 16:36:23 +00:00
docs
includes Unwatch link for pages in Special:Watchlist 2017-08-12 19:36:29 -04:00
languages Add new static function LanguageCode::replaceDeprecatedCodes 2017-08-10 15:21:59 -04:00
maintenance Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
mocks update mediawiki-codesniffer to 0.11.0 and fix issues 2017-08-11 22:27:51 +02:00
skins tests: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 02:14:34 +00:00
structure rdbms: Refactor DatabaseTest 2017-07-20 18:23:37 -07:00
suites Autodiscover parser tests for extensions, deprecate $wgParserTestFiles 2017-07-08 00:47:02 +00:00
tests phpunit: Avoid use of deprecated getMock for PHPUnit 5 compat 2017-04-06 00:44:32 +00:00
autoload.ide.php Miscellaneous indentation tweaks 2017-02-27 19:23:54 +01:00
bootstrap.php
LessFileCompilationTest.php
Makefile Refactor parser tests 2016-09-12 16:11:42 +10:00
MediaWikiLangTestCase.php
MediaWikiPHPUnitTestListener.php
MediaWikiTestCase.php update mediawiki-codesniffer to 0.11.0 and fix issues 2017-08-11 22:27:51 +02:00
phpunit.php Refactor parser tests 2016-09-12 16:11:42 +10:00
README
ResourceLoaderTestCase.php resourceloader: Include lessVars in FileModule definition summary 2017-07-27 03:02:09 +00:00
run-tests.bat
suite.xml phpunit: Exclude /languages/messages from coverage report 2017-07-27 21:03:18 -07:00
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