Skip to content

Commit 0c70e43

Browse files
committed
Fix tests
1 parent 26c82ae commit 0c70e43

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

tests/format/FormatXmlTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public function it_formats_passed_xml_string()
1919
/** @test */
2020
public function it_throws_an_exception_if_non_xml_string_passed()
2121
{
22-
$this->willSeeException(Exception::class, 'String could not be parsed as XML');
22+
$this->expectException(Exception::class);
23+
$this->expectExceptionMessage('String could not be parsed as XML');
2324

2425
format_xml('Non XML');
2526
}

tests/xml/XmlToArrayTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public function it_also_allows_to_pass_simplexmlelement_object()
8989
/** @test */
9090
public function it_throws_an_exception_if_non_xml_string_passed()
9191
{
92-
$this->willSeeException(Exception::class, 'String could not be parsed as XML');
92+
$this->expectException(Exception::class);
93+
$this->expectExceptionMessage('String could not be parsed as XML');
9394

9495
xml_to_array('Non XML');
9596
}

0 commit comments

Comments
 (0)