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, 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 for how to set up Git and Gerrit.

Task tags

  • unit tests
  • php

Students who completed this task


Task type

  • code Code
  • done_all Quality Assurance