markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033'); } $this->parser = new \Magento\Framework\Xml\Parser(); } public function testGetXml() { $this->assertEquals( ['data' => [ 'nodes' => [ 'text' => ' some text ', 'trim_spaces' => '', 'cdata' => ' Some data here html tags are allowed ', 'zero' => '0', 'null' => null, ] ]], $this->parser->load(__DIR__ . '/_files/data.xml')->xmlToArray() ); } /** * @expectedException \Magento\Framework\Exception\LocalizedException * @expectedExceptionMessage DOMDocument::loadXML(): Opening and ending tag mismatch */ public function testLoadXmlInvalid() { $sampleInvalidXml = ''; $this->parser->initErrorHandler(); $this->parser->loadXML($sampleInvalidXml); } }