Skip to content

Commit 559967e

Browse files
Merge branch '3.2'
* 3.2: Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 Further refactorings to PHPUnit namespaces resolve parameters in definition classes
2 parents d8b5266 + 56e3d0a commit 559967e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/OptionsResolverTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,14 @@ public function testResolveFailsIfInvalidType($actualType, $allowedType, $except
507507
{
508508
$this->resolver->setDefined('option');
509509
$this->resolver->setAllowedTypes('option', $allowedType);
510-
$this->setExpectedException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException', $exceptionMessage);
510+
511+
if (method_exists($this, 'expectException')) {
512+
$this->expectException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException');
513+
$this->expectExceptionMessage($exceptionMessage);
514+
} else {
515+
$this->setExpectedException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException', $exceptionMessage);
516+
}
517+
511518
$this->resolver->resolve(array('option' => $actualType));
512519
}
513520

0 commit comments

Comments
 (0)