Skip to content

Commit c9b3e9b

Browse files
Merge branch '2.8' into 3.2
* 2.8: Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 Further refactorings to PHPUnit namespaces resolve parameters in definition classes
2 parents c418766 + 38b3c0f commit c9b3e9b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/Encoder/XmlEncoderTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,12 @@ public function testPreventsComplexExternalEntities()
450450

451451
public function testDecodeEmptyXml()
452452
{
453-
$this->setExpectedException('Symfony\Component\Serializer\Exception\UnexpectedValueException', 'Invalid XML data, it can not be empty.');
453+
if (method_exists($this, 'expectException')) {
454+
$this->expectException('Symfony\Component\Serializer\Exception\UnexpectedValueException');
455+
$this->expectExceptionMessage('Invalid XML data, it can not be empty.');
456+
} else {
457+
$this->setExpectedException('Symfony\Component\Serializer\Exception\UnexpectedValueException', 'Invalid XML data, it can not be empty.');
458+
}
454459
$this->encoder->decode(' ', 'xml');
455460
}
456461

0 commit comments

Comments
 (0)