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()
350
350
351
351
public function testActionCannotBeNull ()
352
352
{
353
- $ this ->expectException (\ Symfony \ Component \ OptionsResolver \ Exception \ InvalidOptionsException::class);
353
+ $ this ->expectException (InvalidOptionsException::class);
354
354
$ this ->factory ->create (static ::TESTED_TYPE , null , ['action ' => null ]);
355
355
}
356
356
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Form \Tests \Extension \Core \Type ;
13
13
14
14
use Symfony \Component \Form \Exception \LogicException ;
15
+ use Symfony \Component \Form \Exception \TransformationFailedException ;
15
16
use Symfony \Component \Intl \Util \IntlTestHelper ;
16
17
17
18
class NumberTypeTest extends BaseTypeTest
@@ -80,7 +81,7 @@ public function testDefaultFormattingWithScaleAndStringInput()
80
81
81
82
public function testStringInputWithFloatData ()
82
83
{
83
- $ this ->expectException (\ Symfony \ Component \ Form \ Exception \ TransformationFailedException::class);
84
+ $ this ->expectException (TransformationFailedException::class);
84
85
$ this ->expectExceptionMessage ('Expected a numeric string. ' );
85
86
86
87
$ this ->factory ->create (static ::TESTED_TYPE , 12345.6789 , [
@@ -91,7 +92,7 @@ public function testStringInputWithFloatData()
91
92
92
93
public function testStringInputWithIntData ()
93
94
{
94
- $ this ->expectException (\ Symfony \ Component \ Form \ Exception \ TransformationFailedException::class);
95
+ $ this ->expectException (TransformationFailedException::class);
95
96
$ this ->expectExceptionMessage ('Expected a numeric string. ' );
96
97
97
98
$ this ->factory ->create (static ::TESTED_TYPE , 12345 , [
Original file line number Diff line number Diff line change 13
13
14
14
use Symfony \Component \Form \ChoiceList \View \ChoiceView ;
15
15
use Symfony \Component \Form \Exception \InvalidConfigurationException ;
16
+ use Symfony \Component \Form \Exception \LogicException ;
16
17
use Symfony \Component \Form \FormError ;
17
18
use Symfony \Component \Form \FormInterface ;
18
19
use Symfony \Component \OptionsResolver \Exception \InvalidOptionsException ;
@@ -478,7 +479,7 @@ public function testSetDataDifferentTimezonesDuringDaylightSavingTime()
478
479
479
480
public function testSetDataDifferentTimezonesWithoutReferenceDate ()
480
481
{
481
- $ this ->expectException (\ Symfony \ Component \ Form \ Exception \ LogicException::class);
482
+ $ this ->expectException (LogicException::class);
482
483
$ this ->expectExceptionMessage ('Using different values for the "model_timezone" and "view_timezone" options without configuring a reference date is not supported. ' );
483
484
484
485
$ form = $ this ->factory ->create (static ::TESTED_TYPE , null , [
Original file line number Diff line number Diff line change 12
12
namespace Symfony \Component \Form \Tests ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Component \Form \Exception \BadMethodCallException ;
15
16
use Symfony \Component \Form \FormRenderer ;
16
17
use Symfony \Component \Form \FormRendererEngineInterface ;
17
18
use Symfony \Component \Form \FormView ;
@@ -32,7 +33,7 @@ public function testHumanize()
32
33
33
34
public function testRenderARenderedField ()
34
35
{
35
- $ this ->expectException (\ Symfony \ Component \ Form \ Exception \ BadMethodCallException::class);
36
+ $ this ->expectException (BadMethodCallException::class);
36
37
$ this ->expectExceptionMessage ('Field "foo" has already been rendered, save the result of previous render call to a variable and output that instead. ' );
37
38
38
39
$ formView = new FormView ();
You can’t perform that action at this time.
0 commit comments