* @covers Xml::expandAttributes
*/
public function testExpandAttributesException() {
- $this->setExpectedException( 'MWException' );
+ $this->setExpectedException( MWException::class );
Xml::expandAttributes( 'string' );
}
*/
public function testElementEscaping() {
$this->assertEquals(
- '<element>hello <there> you & you</element>',
- Xml::element( 'element', null, 'hello <there> you & you' ),
+ '<element>"hello <there> your\'s & you"</element>',
+ Xml::element( 'element', null, '"hello <there> your\'s & you"' ),
'Element with no attributes and content that needs escaping'
);
}