@@ -35,7 +35,7 @@ public function testSetProperties()
3535
3636 public function testSetNotExistingPropertyThrowsException ()
3737 {
38- $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('Symfony\Component\Validator\Exception\InvalidOptionsException ' );
38+ $ this ->expectException ('Symfony\Component\Validator\Exception\InvalidOptionsException ' );
3939
4040 new ConstraintA (array (
4141 'foo ' => 'bar ' ,
@@ -46,14 +46,14 @@ public function testMagicPropertiesAreNotAllowed()
4646 {
4747 $ constraint = new ConstraintA ();
4848
49- $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('Symfony\Component\Validator\Exception\InvalidOptionsException ' );
49+ $ this ->expectException ('Symfony\Component\Validator\Exception\InvalidOptionsException ' );
5050
5151 $ constraint ->foo = 'bar ' ;
5252 }
5353
5454 public function testInvalidAndRequiredOptionsPassed ()
5555 {
56- $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('Symfony\Component\Validator\Exception\InvalidOptionsException ' );
56+ $ this ->expectException ('Symfony\Component\Validator\Exception\InvalidOptionsException ' );
5757
5858 new ConstraintC (array (
5959 'option1 ' => 'default ' ,
@@ -101,14 +101,14 @@ public function testDontSetDefaultPropertyIfValuePropertyExists()
101101
102102 public function testSetUndefinedDefaultProperty ()
103103 {
104- $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('Symfony\Component\Validator\Exception\ConstraintDefinitionException ' );
104+ $ this ->expectException ('Symfony\Component\Validator\Exception\ConstraintDefinitionException ' );
105105
106106 new ConstraintB ('foo ' );
107107 }
108108
109109 public function testRequiredOptionsMustBeDefined ()
110110 {
111- $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } ('Symfony\Component\Validator\Exception\MissingOptionsException ' );
111+ $ this ->expectException ('Symfony\Component\Validator\Exception\MissingOptionsException ' );
112112
113113 new ConstraintC ();
114114 }
0 commit comments