Skip to content

Commit 284c23a

Browse files
committed
Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
1 parent 3688bfa commit 284c23a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tests/Definition/ArrayNodeTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ public function ignoreAndRemoveMatrixProvider()
5555
public function testIgnoreAndRemoveBehaviors($ignore, $remove, $expected, $message = '')
5656
{
5757
if ($expected instanceof \Exception) {
58-
$this->setExpectedException(get_class($expected), $expected->getMessage());
58+
if (method_exists($this, 'expectException')) {
59+
$this->expectException(get_class($expected));
60+
$this->expectExceptionMessage($expected->getMessage());
61+
} else {
62+
$this->setExpectedException(get_class($expected), $expected->getMessage());
63+
}
5964
}
6065
$node = new ArrayNode('root');
6166
$node->setIgnoreExtraKeys($ignore, $remove);

0 commit comments

Comments
 (0)