'modules' => 'startup',
'only' => 'scripts',
'skin' => 'vector',
- 'target' => 'test',
+ 'target' => 'phpunit',
) );
$ctx = $this->getMockBuilder( 'ResourceLoaderContext' )
->setConstructorArgs( array( $resourceLoader, $request ) )
$globals = array();
foreach ( self::getSettings() as $key => $value ) {
- $globals[ 'wg' . $key ] = $value;
+ $globals['wg' . $key] = $value;
}
$this->setMwGlobals( $globals );
}
/* Stubs */
class ResourceLoaderTestModule extends ResourceLoaderModule {
+ protected $messages = array();
protected $dependencies = array();
protected $group = null;
protected $source = 'local';
protected $styles = '';
protected $skipFunction = null;
protected $isRaw = false;
- protected $targets = array( 'test' );
+ protected $targets = array( 'phpunit' );
public function __construct( $options = array() ) {
foreach ( $options as $key => $value ) {
}
public function getScript( ResourceLoaderContext $context ) {
- return $this->script;
+ return $this->validateScriptFile( 'input', $this->script );
}
public function getStyles( ResourceLoaderContext $context ) {
return array( '' => $this->styles );
}
- public function getDependencies() {
+ public function getMessages() {
+ return $this->messages;
+ }
+
+ public function getDependencies( ResourceLoaderContext $context = null ) {
return $this->dependencies;
}
public function isRaw() {
return $this->isRaw;
}
+
+ public function enableModuleContentVersion() {
+ return true;
+ }
}
class ResourceLoaderFileModuleTestModule extends ResourceLoaderFileModule {