Skip to content

Commit 6c501be

Browse files
committed
IHF: format_xml helper tests added.
1 parent 4480605 commit 6c501be

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/format/FormatXmlTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,12 @@ public function it_formats_passed_xml_string()
1010

1111
$this->assertEquals($expected, format_xml($unformatted));
1212
}
13+
14+
/** @test */
15+
public function it_throws_an_exception_if_non_xml_string_passed()
16+
{
17+
$this->willSeeException(Exception::class, 'String could not be parsed as XML');
18+
19+
format_xml('Non XML');
20+
}
1321
}

0 commit comments

Comments
 (0)