Skip to content

Commit 8f5b804

Browse files
author
Ivan Gavryshko
committed
MAGETWO-31422: XML file syntax error does not report file name error is in
- fixed naming in test.
1 parent 48286ec commit 8f5b804

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

dev/tests/unit/testsuite/Magento/Framework/Xml/ParserTest.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ class ParserTest extends \PHPUnit_Framework_TestCase
1111
/** @var \Magento\Framework\Xml\Parser */
1212
protected $parser;
1313

14-
/**
15-
* A sample invalid XML
16-
*
17-
* @var string
18-
*/
19-
private static $sampleXml = '<?xml version="1.0"?><config></onfig>';
20-
2114
protected function setUp()
2215
{
2316
$this->parser = new \Magento\Framework\Xml\Parser();
@@ -43,9 +36,10 @@ public function testGetXml()
4336
* @expectedException \Magento\Framework\Exception
4437
* @expectedExceptionMessage DOMDocument::loadXML(): Opening and ending tag mismatch
4538
*/
46-
public function testInvalidXml()
39+
public function testLoadXmlInvalid()
4740
{
41+
$sampleInvalidXml = '<?xml version="1.0"?><config></onfig>';
4842
$this->parser->initErrorHandler();
49-
$this->parser->loadXML(self::$sampleXml);
43+
$this->parser->loadXML($sampleInvalidXml);
5044
}
5145
}

0 commit comments

Comments
 (0)