8000 [Config] extracted the xml parsing from XmlUtils::loadFile into XmlUtils::parse by Basster · Pull Request #23485 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Config] extracted the xml parsing from XmlUtils::loadFile into XmlUtils::parse #23485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed
Prev Previous commit
Next Next commit
  • Loading branch information
Basster committed Sep 26, 2017
commit ee8ebb5a419e8cdac08e2fe6ed00c4c3b8230cef
8 changes: 4 additions & 4 deletions src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testLoadWithValidator()
$mock = $this->createValidatorMock(true);

$this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate')));
$this->assertSame([], libxml_get_errors());
$this->assertSame(array(), libxml_get_errors());
}

public function provideDataForTestLoadFileExceptions()
Expand All @@ -44,9 +44,9 @@ public function provideDataForTestLoadFileExceptions()
$mock = $this->createValidatorMock(false);

return array(
'invalid' => array($fixtures . 'invalid.xml', '/ERROR 77/'),
'document_type' => array($fixtures. 'document_type.xml', '/Document types are not allowed/'),
'invalid_schema' => array($fixtures . 'schema.xsd', '/ERROR 1845/',$fixtures.'schema.xsd'),
'invalid' => array($fixtures.'invalid.xml', '/ERROR 77/'),
'document_type' => array($fixtures.'document_type.xml', '/Document types are not allowed/'),
'invalid_schema' => array($fixtures.'schema.xsd', '/ERROR 1845/', $fixtures.'schema.xsd'),
'invalid_callback_or_file' => array($fixtures.'invalid_schema.xml', '/XSD file or callable/', 'invalid_callback_or_file'),
'invalid_callback_validator' => array($fixtures.'valid.xml', '/The XML file "[\w:\/\\\.]+" is not valid\./', array($mock, 'validate')),
);
Expand Down
0