This extension for Mediawiki adds test stubs and doubles (or doppelgängers) for use in Lua modules provided by the Scribunto extension. This makes it possible to report failures clearly and visible, to facilitate interactive and collaborative fault fixing.
Extensive help is available at Doppelganger: Test stubs and doubles for Lua code embedded within Mediawiki, with a programmers guide, a reference, and examples.
Doppelganger depends on modules from the Scribunto extension.
-
Download from Github (zip) and place the file(s) in a directory called Doppelganger in your extensions/ folder.
-
Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'Doppelganger' );
-
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Doppelganger uses Mediawiki-Vagrant, and a complete setup can be made quite easily.
-
Make sure you have Vagrant, etc, prepare a development directory, and move to that directory.
-
Clone Mediawiki
git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/vagrant .
-
Add the role unless #539690 has been merged. (You need git-review to do this.)
git review -d 539690
-
Run setup.
./setup.sh
-
Enable role for Doppelganger. This pulls in the role for Scribunto, which then pulls in additional roles.
vagrant roles enable doppelganger
-
Start the instance.
vagrant up
-
Done.