$base + [
'packageFiles' => [
'script-comment.js',
- 'script-nosemi.js' => [ 'main' => true ]
+ [ 'name' => 'script-nosemi.js', 'main' => true ]
],
'deprecated' => 'Deprecation test',
'name' => 'test-deprecated'
[
$base + [
'packageFiles' => [
- 'init.js' => [ 'file' => 'script-comment.js', 'main' => true ],
- 'nosemi.js' => 'script-nosemi.js'
+ [ 'name' => 'init.js', 'file' => 'script-comment.js', 'main' => true ],
+ [ 'name' => 'nosemi.js', 'file' => 'script-nosemi.js' ],
]
],
[
[
$base + [
'packageFiles' => [
- 'foo.json' => [ 'content' => [ 'Hello' => 'world' ] ],
+ [ 'name' => 'foo.json', 'content' => [ 'Hello' => 'world' ] ],
'sample.json',
- 'bar.js' => [ 'content' => "console.log('Hello');" ],
- 'data' => [ 'type' => 'data', 'callback' => function ( $context ) {
+ [ 'name' => 'bar.js', 'content' => "console.log('Hello');" ],
+ [ 'name' => 'data.json', 'callback' => function ( $context ) {
return [ 'langCode' => $context->getLanguage() ];
} ],
- 'config' => [ 'type' => 'data', 'config' => [
+ [ 'name' => 'config.json', 'config' => [
'Sitename',
'wgVersion' => 'Version',
] ],
'type' => 'script',
'content' => "console.log('Hello');",
],
- 'data' => [
+ 'data.json' => [
'type' => 'data',
'content' => [ 'langCode' => 'fy' ]
],
- 'config' => [
+ 'config.json' => [
'type' => 'data',
'content' => [
'Sitename' => $config->get( 'Sitename' ),
[
$base + [
'packageFiles' => [
- 'foo.json' => [ 'callback' => 'functionThatDoesNotExist142857' ]
+ [ 'name' => 'foo.json', 'callback' => 'functionThatDoesNotExist142857' ]
]
],
false
[
$base + [
'packageFiles' => [
- 'foo' => [ 'type' => 'script', 'config' => [ 'Sitename' ] ]
+ 'foo.json' => [ 'type' => 'script', 'config' => [ 'Sitename' ] ]
]
],
false
[
$base + [
'packageFiles' => [
- 'foo.js' => [ 'config' => 'Sitename' ]
+ [ 'name' => 'foo.js', 'config' => 'Sitename' ]
]
],
false
$base + [
'packageFiles' => [
'script-nosemi.js',
- 'foo.json' => [
- 'type' => 'data',
- 'content' => [ 'Hello' => 'world' ],
- 'main' => true
- ]
+ [ 'name' => 'foo.json', 'content' => [ 'Hello' => 'world' ], 'main' => true ]
]
],
false