X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fresourceloader%2FResourceLoaderClientHtmlTest.php;h=e1ee3248cc7d6fedc6241e3d2f55aa045a0b6a45;hb=7af7bbe7476996bf60d8d8e48a84687ccd7505df;hp=206160c7cf925949d37764bdb173ac94a2ce9644;hpb=956ffb9cd77bb9748cf7bc425d50f0eea7e3abdd;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php index 206160c7cf..e1ee3248cc 100644 --- a/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php +++ b/tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php @@ -116,9 +116,9 @@ Deprecation message.' ] . '' . "\n" - . '' . "\n" + . '' . "\n" . '' . "\n" - . ''; + . ''; // phpcs:enable $expected = self::expandVariables( $expected ); @@ -136,7 +136,7 @@ Deprecation message.' ] // phpcs:disable Generic.Files.LineLength $expected = '' . "\n" - . ''; + . ''; // phpcs:enable $this->assertSame( $expected, (string)$client->getHeadHtml() ); @@ -153,7 +153,7 @@ Deprecation message.' ] // phpcs:disable Generic.Files.LineLength $expected = '' . "\n" - . ''; + . ''; // phpcs:enable $this->assertSame( $expected, (string)$client->getHeadHtml() ); @@ -170,7 +170,7 @@ Deprecation message.' ] // phpcs:disable Generic.Files.LineLength $expected = '' . "\n" - . ''; + . ''; // phpcs:enable $this->assertSame( $expected, (string)$client->getHeadHtml() ); @@ -224,54 +224,54 @@ Deprecation message.' ] ], [ 'context' => [], - // Eg. startup module - 'modules' => [ 'test.scripts.raw' ], + 'modules' => [ 'test.scripts' ], 'only' => ResourceLoaderModule::TYPE_SCRIPTS, - 'extra' => [], - 'output' => '', + // Eg. startup module + 'extra' => [ 'raw' => '1' ], + 'output' => '', ], [ 'context' => [], - 'modules' => [ 'test.scripts.raw' ], + 'modules' => [ 'test.scripts' ], 'only' => ResourceLoaderModule::TYPE_SCRIPTS, - 'extra' => [ 'sync' => '1' ], - 'output' => '', + 'extra' => [ 'raw' => '1', 'sync' => '1' ], + 'output' => '', ], [ 'context' => [], 'modules' => [ 'test.scripts.user' ], 'only' => ResourceLoaderModule::TYPE_SCRIPTS, 'extra' => [], - 'output' => '', + 'output' => '', ], [ 'context' => [], 'modules' => [ 'test.user' ], 'only' => ResourceLoaderModule::TYPE_COMBINED, 'extra' => [], - 'output' => '', + 'output' => '', ], [ 'context' => [ 'debug' => 'true' ], 'modules' => [ 'test.styles.pure', 'test.styles.mixed' ], 'only' => ResourceLoaderModule::TYPE_STYLES, 'extra' => [], - 'output' => '' . "\n" - . '', + 'output' => '' . "\n" + . '', ], [ 'context' => [ 'debug' => 'false' ], 'modules' => [ 'test.styles.pure', 'test.styles.mixed' ], 'only' => ResourceLoaderModule::TYPE_STYLES, 'extra' => [], - 'output' => '', + 'output' => '', ], [ 'context' => [], 'modules' => [ 'test.styles.noscript' ], 'only' => ResourceLoaderModule::TYPE_STYLES, 'extra' => [], - 'output' => '', + 'output' => '', ], [ 'context' => [], @@ -299,7 +299,7 @@ Deprecation message.' ] 'modules' => [ 'test', 'test.shouldembed' ], 'only' => ResourceLoaderModule::TYPE_COMBINED, 'extra' => [], - 'output' => '', + 'output' => '', ], [ 'context' => [], @@ -307,7 +307,7 @@ Deprecation message.' ] 'only' => ResourceLoaderModule::TYPE_STYLES, 'extra' => [], 'output' => - '' . "\n" + '' . "\n" . '' ], [ @@ -316,9 +316,9 @@ Deprecation message.' ] 'only' => ResourceLoaderModule::TYPE_STYLES, 'extra' => [], 'output' => - '' . "\n" + '' . "\n" . '' . "\n" - . '' + . '' ], ]; // phpcs:enable @@ -374,7 +374,7 @@ Deprecation message.' ] } private static function makeModule( array $options = [] ) { - return new ResourceLoaderTestModule( $options ); + return $options + [ 'class' => ResourceLoaderTestModule::class ]; } private static function makeSampleModules() { @@ -418,7 +418,6 @@ Deprecation message.' ] 'test.scripts' => [], 'test.scripts.user' => [ 'group' => 'user' ], 'test.scripts.user.empty' => [ 'group' => 'user', 'isKnownEmpty' => true ], - 'test.scripts.raw' => [ 'isRaw' => true ], 'test.scripts.shouldembed' => [ 'shouldEmbed' => true ], 'test.ordering.a' => [ 'shouldEmbed' => false ],