Skip to content

Commit b9fc409

Browse files
Merge branch '5.1' into 5.2
* 5.1: Use import instead of FQCN
2 parents 9ba5f38 + b794bed commit b9fc409

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

Tests/Extension/Core/Type/FormTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Tests/Extension/Core/Type/NumberTypeTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Tests\Extension\Core\Type;
1313

1414
use Symfony\Component\Form\Exception\LogicException;
15+
use Symfony\Component\Form\Exception\TransformationFailedException;
1516
use Symfony\Component\Intl\Util\IntlTestHelper;
1617

1718
class 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, [

Tests/Extension/Core/Type/TimeTypeTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Form\ChoiceList\View\ChoiceView;
1515
use Symfony\Component\Form\Exception\InvalidConfigurationException;
16+
use Symfony\Component\Form\Exception\LogicException;
1617
use Symfony\Component\Form\FormError;
1718
use Symfony\Component\Form\FormInterface;
1819
use 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, [

Tests/FormRendererTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Form\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\Form\Exception\BadMethodCallException;
1516
use Symfony\Component\Form\FormRenderer;
1617
use Symfony\Component\Form\FormRendererEngineInterface;
1718
use 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();

0 commit comments

Comments
 (0)