@expectedException is deprecated

Bug: T234597
Change-Id: Ieeb352cb37822b9eabc5179d7a30fb137070639b
This commit is contained in:
Max Semenik 2019-10-11 19:39:25 -07:00
parent 048712015b
commit c874b0c4bc
2 changed files with 4 additions and 8 deletions

View file

@ -96,11 +96,9 @@ class TemplateStylesContentTest extends TextContentTest {
];
}
/**
* @expectedException InvalidArgumentException
* @expectedExceptionMessage Invalid value for $extraWrapper: .foo>.bar
*/
public function testInvalidWrapper() {
$this->expectException( InvalidArgumentException::class );
$this->expectExceptionMessage( 'Invalid value for $extraWrapper: .foo>.bar' );
$this->newContent( '.foo { margin-left: 10px }' )->sanitize( [
'extraWrapper' => '.foo>.bar',
] );

View file

@ -29,11 +29,9 @@ class TemplateStylesHooksTest extends MediaWikiLangTestCase {
);
}
/**
* @expectedException InvalidArgumentException
* @expectedExceptionMessage Invalid value for $extraWrapper: .foo>.bar
*/
public function testGetSanitizerInvalidWrapper() {
$this->expectException( InvalidArgumentException::class );
$this->expectExceptionMessage( 'Invalid value for $extraWrapper: .foo>.bar' );
TemplateStylesHooks::getSanitizer( 'foo', '.foo>.bar' );
}