$modules = self::getModules();
$rl = new ResourceLoaderFileModule( $modules[$name] );
$rl->setName( $name );
- $ctx = $this->getResourceLoaderContext( 'en', 'ltr' );
+ $ctx = $this->getResourceLoaderContext();
$this->assertEquals( $rl->getScript( $ctx ), $expected );
}
] );
$expectedModule->setName( 'testing' );
- $contextLtr = $this->getResourceLoaderContext( 'en', 'ltr' );
- $contextRtl = $this->getResourceLoaderContext( 'he', 'rtl' );
+ $contextLtr = $this->getResourceLoaderContext( [
+ 'lang' => 'en',
+ 'dir' => 'ltr',
+ ] );
+ $contextRtl = $this->getResourceLoaderContext( [
+ 'lang' => 'he',
+ 'dir' => 'rtl',
+ ] );
// Since we want to compare the effect of @noflip+@embed against the effect of just @embed, and
// the @noflip annotations are always preserved, we need to strip them first.
'File has leading BOM'
);
- $contextLtr = $this->getResourceLoaderContext( 'en', 'ltr' );
+ $context = $this->getResourceLoaderContext();
$this->assertEquals(
- $testModule->getStyles( $contextLtr ),
+ $testModule->getStyles( $context ),
[ 'all' => ".efbbbf_bom_char_at_start_of_file {}\n" ],
'Leading BOM removed when concatenating files'
);