Skip to content

Commit df9e6c0

Browse files
committed
Replace calls to setExpectedException by Pollyfill
1 parent 4351bf9 commit df9e6c0

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Tests/OptionsResolverTest.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,8 @@ public function testResolveFailsIfInvalidType($actualType, $allowedType, $except
549549
$this->resolver->setDefined('option');
550550
$this->resolver->setAllowedTypes('option', $allowedType);
551551

552-
if (method_exists($this, 'expectException')) {
553-
$this->expectException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException');
554-
$this->expectExceptionMessage($exceptionMessage);
555-
} else {
556-
$this->setExpectedException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException', $exceptionMessage);
557-
}
552+
$this->expectException('Symfony\Component\OptionsResolver\Exception\InvalidOptionsException');
553+
$this->expectExceptionMessage($exceptionMessage);
558554

559555
$this->resolver->resolve(['option' => $actualType]);
560556
}

0 commit comments

Comments
 (0)