{$tag}>{$content}{$tag}>";
$result = PortableInfobox\Parser\XmlParser::parseXmlString( $markup );
$this->assertEquals( $content, (string)$result->{$tag} );
}
public function contentTagsDataProvider() {
return [
[ 'default', 'sadf
sakdjfl' ],
[ 'format', '<>' ],
[ 'label', '' ]
];
}
/**
* @dataProvider entitiesTestDataProvider
*/
public function testHTMLEntities( $markup, $expectedResult ) {
$result = PortableInfobox\Parser\XmlParser::parseXmlString( $markup );
$this->assertEquals( $expectedResult, $result[ 0 ] );
}
public function entitiesTestDataProvider() {
return [
[ '', '' ],
[ '&aksjdf;', '&aksjdf;' ],
[ '&', '&' ],
[ '·', '·' ],
[ 'Ü', 'Ü' ],
[ 'Δ', 'Δ' ],
[ '&', '&' ],
[ '&', '&' ]
];
}
}