Wikimedia

Add PHPUnit tests to the ApiFormatRaw class in MediaWiki core

In MediaWiki core, the ApiFormatRaw class is a bit special, it isn't exposed directly to users and basically spits out exactly whatever is passed to it. Regardless, we should still have tests for this functionality.

If you're not already familiar with PHPUnit tests, https://www.mediawiki.org/wiki/Manual:PHP_unit_testing/Writing_unit_tests has links to some good material on the basics of testing.

I would suggest creating something similar to ApiFormatNoneTest (instead of verifying there is no output, you'd verify the output is exactly the same...).

You are expected to provide a patch in Wikimedia Gerrit. See https://www.mediawiki.org/wiki/Gerrit/Tutorial for how to set up Git and Gerrit.

Task tags

  • unit tests
  • php

Students who completed this task

Phantom42

Task type

  • code Code
  • done_all Quality Assurance
close

2017