From: Brad Jorsch Date: Tue, 2 Feb 2016 14:27:05 +0000 (-0500) Subject: Set title on context in ApiDocumentationTest X-Git-Tag: 1.31.0-rc.0~8102 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=7d4d9016d4a57d50b8fd086d480019063e704a78;p=lhc%2Fweb%2Fwiklou.git Set title on context in ApiDocumentationTest For some reason the unit testing infrastructure doesn't set one, and that makes RequestContext warn. Bug: T125491 Change-Id: I3e0ec0f567dd06231bca0d3d923e9d4e05ef5514 --- diff --git a/tests/phpunit/structure/ApiDocumentationTest.php b/tests/phpunit/structure/ApiDocumentationTest.php index d2f96dc9cb..5cf75bdfdc 100644 --- a/tests/phpunit/structure/ApiDocumentationTest.php +++ b/tests/phpunit/structure/ApiDocumentationTest.php @@ -33,6 +33,9 @@ class ApiDocumentationTest extends MediaWikiTestCase { if ( !self::$main ) { self::$main = new ApiMain( RequestContext::getMain() ); self::$main->getContext()->setLanguage( 'en' ); + self::$main->getContext()->setTitle( + Title::makeTitle( NS_SPECIAL, 'Badtitle/dummy title for ApiDocumentationTest' ) + ); } return self::$main; }