Skip to content

Commit df85a89

Browse files
peterrehmnicolas-grekas
authored andcommitted
Further refactorings to PHPUnit namespaces
1 parent 350be85 commit df85a89

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/OptionsResolver2Dot6Test.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)