createMock( Title::class ); $title->method( 'inNamespace' ) ->willReturn( true ); $title->method( 'getText' ) ->willReturn( 'Cite-tool-definition.json' ); CiteHooks::onContentHandlerDefaultModelFor( $title, $model ); $this->assertSame( CONTENT_MODEL_JSON, $model ); } /** * @covers ::onResourceLoaderRegisterModules */ public function testOnResourceLoaderRegisterModules() { $resourceLoader = $this->createMock( ResourceLoader::class ); $resourceLoader->expects( $this->atLeastOnce() ) ->method( 'register' ); CiteHooks::onResourceLoaderRegisterModules( $resourceLoader ); } }