File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed
Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ public function testAttributesException()
350350
351351 public function testActionCannotBeNull ()
352352 {
353- $ this ->expectException (\ Symfony \ Component \ OptionsResolver \ Exception \ InvalidOptionsException::class);
353+ $ this ->expectException (InvalidOptionsException::class);
354354 $ this ->factory ->create (static ::TESTED_TYPE , null , ['action ' => null ]);
355355 }
356356
Original file line number Diff line number Diff line change 1212namespace Symfony \Component \Form \Tests \Extension \Core \Type ;
1313
1414use Symfony \Component \Form \Exception \LogicException ;
15+ use Symfony \Component \Form \Exception \TransformationFailedException ;
1516use Symfony \Component \Intl \Util \IntlTestHelper ;
1617
1718class NumberTypeTest extends BaseTypeTest
@@ -80,7 +81,7 @@ public function testDefaultFormattingWithScaleAndStringInput()
8081
8182 public function testStringInputWithFloatData ()
8283 {
83- $ this ->expectException (\ Symfony \ Component \ Form \ Exception \ TransformationFailedException::class);
84+ $ this ->expectException (TransformationFailedException::class);
8485 $ this ->expectExceptionMessage ('Expected a numeric string. ' );
8586
8687 $ this ->factory ->create (static ::TESTED_TYPE , 12345.6789 , [
@@ -91,7 +92,7 @@ public function testStringInputWithFloatData()
9192
9293 public function testStringInputWithIntData ()
9394 {
94- $ this ->expectException (\ Symfony \ Component \ Form \ Exception \ TransformationFailedException::class);
95+ $ this ->expectException (TransformationFailedException::class);
9596 $ this ->expectExceptionMessage ('Expected a numeric string. ' );
9697
9798 $ this ->factory ->create (static ::TESTED_TYPE , 12345 , [
Original file line number Diff line number Diff line change 1313
1414use Symfony \Component \Form \ChoiceList \View \ChoiceView ;
1515use Symfony \Component \Form \Exception \InvalidConfigurationException ;
16+ use Symfony \Component \Form \Exception \LogicException ;
1617use Symfony \Component \Form \FormError ;
1718use Symfony \Component \Form \FormInterface ;
1819use Symfony \Component \OptionsResolver \Exception \InvalidOptionsException ;
@@ -478,7 +479,7 @@ public function testSetDataDifferentTimezonesDuringDaylightSavingTime()
478479
479480 public function testSetDataDifferentTimezonesWithoutReferenceDate ()
480481 {
481- $ this ->expectException (\ Symfony \ Component \ Form \ Exception \ LogicException::class);
482+ $ this ->expectException (LogicException::class);
482483 $ this ->expectExceptionMessage ('Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is not supported. ' );
483484
484485 $ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [
Original file line number Diff line number Diff line change 1212namespace Symfony \Component \Form \Tests ;
1313
1414use PHPUnit \Framework \TestCase ;
15+ use Symfony \Component \Form \Exception \BadMethodCallException ;
1516use Symfony \Component \Form \FormRenderer ;
1617use Symfony \Component \Form \FormRendererEngineInterface ;
1718use Symfony \Component \Form \FormView ;
@@ -32,7 +33,7 @@ public function testHumanize()
3233
3334 public function testRenderARenderedField ()
3435 {
35- $ this ->expectException (\ Symfony \ Component \ Form \ Exception \ BadMethodCallException::class);
36+ $ this ->expectException (BadMethodCallException::class);
3637 $ this ->expectExceptionMessage ('Field "foo" has already been rendered, save the result of previous render call to a variable and output that instead. ' );
3738
3839 $ formView = new FormView ();
You can’t perform that action at this time.
0 commit comments