We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
xml_to_array
1 parent c7a8e41 commit b712516Copy full SHA for b712516
tests/xml/XmlToArrayTest.php
@@ -61,4 +61,12 @@ public function it_also_allows_to_pass_simplexmlelement_object()
61
62
$this->assertEquals($expected, xml_to_array($xml));
63
}
64
+
65
+ /** @test */
66
+ public function it_throws_an_exception_if_non_xml_string_passed()
67
+ {
68
+ $this->willSeeException(Exception::class, 'String could not be parsed as XML');
69
70
+ xml_to_array('Non XML');
71
+ }
72
0 commit comments