}
}
+ /**
+ * @param WikiPage $page
+ * @param Revision $rev
+ *
+ * @return ParserOutput|bool False if the revision was not found
+ */
protected function getParserOutput( WikiPage $page, Revision $rev ) {
$parserOptions = $page->makeParserOptions( $this->getContext() );
* @return MWHttpRequest
* @see MWHttpRequest::__construct
*/
- public static function factory( $url, $options = null, $caller = __METHOD__ ) {
+ public static function factory( $url, array $options = [], $caller = __METHOD__ ) {
return \MediaWiki\MediaWikiServices::getInstance()
->getHttpRequestFactory()
->create( $url, $options, $caller );
display: none;
}
+ #jump-to-nav {
+ margin-top: -0.5em;
+ margin-bottom: 0.5em;
+ }
+
// Make the watchlist-details message display while loading, but make it not take up any
// space. This makes the min-height trick work better.
.watchlistDetails {
$this->assertSame( 401, $request->getStatus() );
}
+ public function testFactoryDefaults() {
+ $request = MWHttpRequest::factory( 'http://acme.test' );
+ $this->assertInstanceOf( MWHttpRequest::class, $request );
+ }
+
// --------------------
/**
$this->assertArrayNotHasKey( strtolower( $name ),
array_change_key_case( $cookieJar->cookie, CASE_LOWER ) );
}
+
}