<{$tag}>{$content}"; $result = 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 = XmlParser::parseXmlString( $markup ); $this->assertEquals( $expectedResult, $result[ 0 ] ); } public function entitiesTestDataProvider() { return [ [ '', '' ], [ '&aksjdf;', '&aksjdf;' ], [ '&', '&' ], [ '·', '·' ], [ 'Ü', 'Ü' ], [ 'Δ', 'Δ' ], [ '&amp;', '&' ], [ '&', '&' ] ]; } }