Update for MediaWiki 1.22 and add basic test

Change-Id: I0c05be587e9c458118eba9779e6573514a44e547