]
],
+ 'htmlTemplateUnknown' => $base + [
+ 'templates' => [
+ 'templates/notfound.html',
+ ]
+ ],
+
'aliasedHtmlTemplateModule' => $base + [
'templates' => [
'foo.html' => 'templates/template.html',
'bar.html' => "<div>goodbye</div>\n",
],
],
+ [
+ $modules['htmlTemplateUnknown'],
+ false,
+ ],
];
}
$rl = new ResourceLoaderFileModule( $module );
$rl->setName( 'testing' );
- $this->assertEquals( $rl->getTemplates(), $expected );
+ if ( $expected === false ) {
+ $this->setExpectedException( MWException::class );
+ $rl->getTemplates();
+ } else {
+ $this->assertEquals( $rl->getTemplates(), $expected );
+ }
}
public function testBomConcatenation() {