MediaWiki  master
README
Go to the documentation of this file.
1 == MediaWiki PHPUnit Tests ==
2 
3 The unit tests for MediaWiki are implemented using the PHPUnit testing
4 framework and require PHPUnit to run.
5 
6 
7 === WARNING ===
8 
9 Some of the unit tests are DESTRUCTIVE and WILL ALTER YOUR WIKI'S CONTENTS.
10 
11 DO NOT RUN THESE TESTS ON A PRODUCTION SYSTEM OR ON ANY SYSTEM WHERE YOU NEED
12 TO RETAIN YOUR DATA.
13 
14 
15 == Installation ==
16 
17 If you used composer to install MediaWiki's dependencies PHPUnit will already be available, unless
18 you explicitly specified the --no-dev flag during the install. In this case just run "composer update".
19 
20 Otherwise follow the installation instructions in the
21 PHPUnit Manual at:
22 
23  https://phpunit.de/manual/current/en/installation.html
24 
25 
26 == Running tests ==
27 
28 The tests are run from your operating system's command line.
29 
30 Ensure that you are in the tests/phpunit directory of your MediaWiki
31 installation.
32 
33 
34 On Unix-like operating systems, the tests runs are controlled with a makefile.
35 Run command:
36 
37  make help
38 
39 for a full list of options for running tests.
40 
41 
42 On Windows-family operating systems, run the 'run-tests.bat' batch file.
43 
44 
45 === Writing tests ===
46 
47 A guide to writing PHP unit tests for MediaWiki can be found at:
48 
49  https://www.mediawiki.org/wiki/Manual:PHP_unit_testing
50 
#define the
table suitable for use with IDatabase::select()
The classes in this directory are general utilities for use by any part of MediaWiki They do not favour any particular user interface and are not constrained to serve any particular feature This is similar to includes except that some dependency on the MediaWiki framework(such as the use of MWException, Status or wfDebug()) disqualifies them from use outside of MediaWiki without modification.Utilities should not use global configuration variables
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable from
globals txt Globals are evil The original MediaWiki code relied on globals for processing context far too often MediaWiki development since then has been a story of slowly moving context out of global variables and into objects Storing processing context in object member variables allows those objects to be reused in a much more flexible way Consider the elegance of
database rows
Definition: globals.txt:10
null for the local wiki Added in
Definition: hooks.txt:1435
The MediaWiki class is the helper class for the index.php entry point.
Definition: MediaWiki.php:28
processing should stop and the error should be shown to the user if you wanted to authenticate users to a custom system(LDAP, another PHP program, whatever)
The ContentHandler facility adds support for arbitrary content types on wiki instead of relying on wikitext for everything It was introduced in MediaWiki Each kind of and so on Built in content types are
and *available in your language For system and upgrade see the files RELEASE and UPGRADE *Ready to get started ** https
Definition: README:16
and(b) You must cause any modified files to carry prominent notices stating that You changed the files
and *available in your language For system installation
Definition: README:16
or there are no hooks to run
Definition: hooks.txt:223
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
Definition: README:1
*simple to install
Definition: README:13
</td >< td > &</td >< td > t want your writing to be edited mercilessly and redistributed at will