Skip to content

Commit b712516

Browse files
committed
IHF: xml_to_array tests added.
1 parent c7a8e41 commit b712516

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/xml/XmlToArrayTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,12 @@ public function it_also_allows_to_pass_simplexmlelement_object()
6161

6262
$this->assertEquals($expected, xml_to_array($xml));
6363
}
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+
}
6472
}

0 commit comments

Comments
 (0)