Go to the documentation of this file.
7 protected function setUp() {
13 'wgResourceLoaderLESSFunctions' =>
array(
14 'test-sum' =>
function ( $frame, $less ) {
16 foreach ( $frame[2]
as $arg ) {
22 'wgResourceLoaderLESSImportPaths' =>
array(
23 dirname( dirname( __DIR__ ) ) .
'/data/less/common',
25 'wgResourceLoaderLESSVars' =>
array(
39 self::$resourceLoaderRegisterModulesHook =
true;
58 self::$resourceLoaderRegisterModulesHook =
false;
60 $this->assertTrue( self::$resourceLoaderRegisterModulesHook );
83 $basePath = __DIR__ .
'/../../data/less/module';
85 'localBasePath' => $basePath,
86 'styles' =>
array(
'styles.less' ),
88 $module->setName(
'test.less' );
89 $styles = $module->getStyles( $context );
90 $this->assertStringEqualsFile( $basePath .
'/styles.css', $styles[
'all'] );
112 'Example from makePackedModulesString doc comment',
113 array(
'foo.bar',
'foo.baz',
'bar.baz',
'bar.quux' ),
114 'foo.bar,baz|bar.baz,quux',
117 'Example from expandModuleNames doc comment',
118 array(
'jquery.foo',
'jquery.bar',
'jquery.ui.baz',
'jquery.ui.quux' ),
119 'jquery.foo,bar|jquery.ui.baz,quux',
122 'Regression fixed in r88706 with dotless names',
123 array(
'foo',
'bar',
'baz' ),
127 'Prefixless modules after a prefixed module',
128 array(
'single.module',
'foobar',
'foobaz' ),
129 'single.module|foobar,foobaz',
137 $wgHooks[
'ResourceLoaderRegisterModules'][] =
'ResourceLoaderTest::resourceLoaderRegisterModules';
testMakePackedModulesString( $desc, $modules, $packed)
@dataProvider providePackedModules @covers ResourceLoader::makePackedModulesString
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
static $resourceLoaderRegisterModulesHook
static makePackedModulesString( $modules)
Convert an array of module names to a packed query string.
static resourceLoaderRegisterModules(&$resourceLoader)
ResourceLoaderRegisterModules hook.
testRegisteredValidModulesAreAccessible( $name, ResourceLoaderModule $module, ResourceLoader $resourceLoader)
@dataProvider provideValidModules @depends testCreatingNewResourceLoaderCallsRegistrationHook @covers...
static expandModuleNames( $modules)
Expand a string of the form jquery.foo,bar|jquery.ui.baz,quux to an array of module names like array(...
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled also a ContextSource error or success you ll probably need to make sure the header is varied on WebRequest such as when responding to a resource loader request or generating HTML output & $resourceLoader
ResourceLoader module based on local JavaScript/CSS files.
static getResourceLoaderContext()
static provideValidModules()
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
testCreatingNewResourceLoaderCallsRegistrationHook()
Ensures that the ResourceLoaderRegisterModules hook is called when a new ResourceLoader object is con...
testexpandModuleNames( $desc, $modules, $packed)
@dataProvider providePackedModules @covers ResourceLoaderContext::expandModuleNames
Allows to change the fields on the form that will be generated $name
Abstraction for resource loader modules, with name registration and maxage functionality.
Dynamic JavaScript and CSS resource loading system.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
testLessFileCompilation()
@covers ResourceLoaderFileModule::compileLessFile
static providePackedModules()