From 2db395abfc5e6fc4035acc359a1fb6e62fad61fb Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 22 May 2018 18:58:04 +0100 Subject: [PATCH] resourceloader: Move style deprecation warnings to Follows-up If35a106c7. These log messages are not criticial and should not be in the competing with stylesheets and article content. Move them to the end of instead, nearby other low-priority script tags. The getBodyHtml() method from ClientHtml was empty, but has been non-empty in the past. It's fine to repopulate. Also, while ClientHtml::getBodyHtml was empty, there are additional RLQ scripts created by OutputPage that do exist even without this. Namely, there is a ' . "\n" . '' . "\n" . '' . "\n" @@ -304,18 +303,23 @@ Deprecation message.' ] $context = self::makeContext(); $context->getResourceLoader()->register( self::makeSampleModules() ); - $client = new ResourceLoaderClientHtml( $context ); + $client = new ResourceLoaderClientHtml( $context, [ 'nonce' => false ] ); $client->setConfig( [ 'key' => 'value' ] ); $client->setModules( [ 'test', 'test.private.bottom', ] ); + $client->setModuleStyles( [ + 'test.styles.deprecated', + ] ); $client->setModuleScripts( [ 'test.scripts', ] ); - - $expected = ''; - $expected = self::expandVariables( $expected ); + // phpcs:disable Generic.Files.LineLength + $expected = ''; + // phpcs:enable $this->assertEquals( $expected, $client->getBodyHtml() ); } -- 2.20.1