@@ -490,6 +490,7 @@ public function testFailIfSetAllowedTypesFromLazyOption()
490
490
491
491
/**
492
492
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
493
+ * @expectedExceptionMessage The option "foo" with value 42 is expected to be of type "string", but is of type "integer".
493
494
*/
494
495
public function testResolveFailsIfInvalidType ()
495
496
{
@@ -509,6 +510,7 @@ public function testResolveSucceedsIfValidType()
509
510
510
511
/**
511
512
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
513
+ * @expectedExceptionMessage The option "foo" with value 42 is expected to be of type "string" or "bool", but is of type "integer".
512
514
*/
513
515
public function testResolveFailsIfInvalidTypeMultiple ()
514
516
{
@@ -659,6 +661,7 @@ public function testFailIfSetAllowedValuesFromLazyOption()
659
661
660
662
/**
661
663
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
664
+ * @expectedExceptionMessage The option "foo" with value 42 is invalid. Accepted values are: "bar".
662
665
*/
663
666
public function testResolveFailsIfInvalidValue ()
664
667
{
@@ -689,11 +692,12 @@ public function testResolveSucceedsIfValidValue()
689
692
690
693
/**
691
694
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
695
+ * @expectedExceptionMessage The option "foo" with value 42 is invalid. Accepted values are: "bar", false, null.
692
696
*/
693
697
public function testResolveFailsIfInvalidValueMultiple ()
694
698
{
695
699
$ this ->resolver ->setDefault ('foo ' , 42 );
696
- $ this ->resolver ->setAllowedValues ('foo ' , array ('bar ' , ' baz ' ));
700
+ $ this ->resolver ->setAllowedValues ('foo ' , array ('bar ' , false , null ));
697
701
698
702
$ this ->resolver ->resolve ();
699
703
}
0 commit comments