E60B [TwigBridge] Remove `VersionAwareTest` from `AbstractLayoutTestCase` · symfony/symfony@4219d16 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4219d16

Browse files
[TwigBridge] Remove VersionAwareTest from AbstractLayoutTestCase
1 parent fa06f56 commit 4219d16

File tree

5 files changed

+0
-66
lines changed

5 files changed

+0
-66
lines changed

src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTestCase.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2869,8 +2869,6 @@ public function testColor()
28692869

28702870
public function testWeekSingleText()
28712871
{
2872-
$this->requiresFeatureSet(404);
2873-
28742872
$form = $this->factory->createNamed('holidays', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '1970-W01', [
28752873
'input' => 'string',
28762874
'widget' => 'single_text',
@@ -2889,8 +2887,6 @@ public function testWeekSingleText()
28892887

28902888
public function testWeekSingleTextNoHtml5()
28912889
{
2892-
$this->requiresFeatureSet(404);
2893-
28942890
$form = $this->factory->createNamed('holidays', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '1970-W01', [
28952891
'input' => 'string',
28962892
'widget' => 'single_text',
@@ -2910,8 +2906,6 @@ public function testWeekSingleTextNoHtml5()
29102906

29112907
public function testWeekChoices()
29122908
{
2913-
$this->requiresFeatureSet(404);
2914-
29152909
$data = ['year' => (int) date('Y'), 'week' => 1];
29162910

29172911
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\WeekType', $data, [
@@ -2938,8 +2932,6 @@ public function testWeekChoices()
29382932

29392933
public function testWeekText()
29402934
{
2941-
$this->requiresFeatureSet(404);
2942-
29432935
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '2000-W01', [
29442936
'input' => 'string',
29452937
'widget' => 'text',

src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap5LayoutTestCase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,8 +1842,6 @@ public function testTimezoneWithPlaceholder()
18421842

18431843
public function testWeekChoices()
18441844
{
1845-
$this->requiresFeatureSet(404);
1846-
18471845
$data = ['year' => (int) date('Y'), 'week' => 1];
18481846

18491847
$form = $this->factory->createNamed('name', WeekType::class, $data, [

src/Symfony/Bridge/Twig/Tests/Extension/AbstractLayoutTestCase.php

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@
1818
use Symfony\Component\Form\Extension\Csrf\CsrfExtension;
1919
use Symfony\Component\Form\FormError;
2020
use Symfony\Component\Form\FormView;
21-
use Symfony\Component\Form\Tests\VersionAwareTest;
2221
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
2322
use Symfony\Component\Translation\TranslatableMessage;
2423
use Symfony\Contracts\Translation\TranslatableInterface;
2524
use Symfony\Contracts\Translation\TranslatorInterface;
2625

2726
abstract class AbstractLayoutTestCase extends FormLayoutTestCase
2827
{
29-
use VersionAwareTest;
30-
3128
protected MockObject&CsrfTokenManagerInterface $csrfTokenManager;
3229
protected array $testableFeatures = [];
3330

@@ -672,8 +669,6 @@ public function testSingleExpandedChoiceAttributesWithMainAttributes()
672669

673670
public function testSingleChoiceWithPreferred()
674671
{
675-
$this->requiresFeatureSet(404);
676-
677672
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [
678673
'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'],
679674
'preferred_choices' => ['&b'],
@@ -698,8 +693,6 @@ public function testSingleChoiceWithPreferred()
698693

699694
public function testSingleChoiceWithPreferredAndNoSeparator()
700695
{
701-
$this->requiresFeatureSet(404);
702-
703696
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [
704697
'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'],
705698
'preferred_choices' => ['&b'],
@@ -723,8 +716,6 @@ public function testSingleChoiceWithPreferredAndNoSeparator()
723716

724717
public function testSingleChoiceWithPreferredAndBlankSeparator()
725718
{
726-
$this->requiresFeatureSet(404);
727-
728719
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [
729720
'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'],
730721
'preferred_choices' => ['&b'],
@@ -749,8 +740,6 @@ public function testSingleChoiceWithPreferredAndBlankSeparator()
749740

750741
public function testChoiceWithOnlyPreferred()
751742
{
752-
$this->requiresFeatureSet(404);
753-
754743
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [
755744
'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'],
756745
'preferred_choices' => ['&a', '&b'],
@@ -1814,8 +1803,6 @@ public function testNumber()
18141803

18151804
public function testRenderNumberWithHtml5NumberType()
18161805
{
1817-
$this->requiresFeatureSet(403);
1818-
18191806
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\NumberType', 1234.56, [
18201807
'html5' => true,
18211808
]);
@@ -1832,8 +1819,6 @@ public function testRenderNumberWithHtml5NumberType()
18321819

18331820
public function testRenderNumberWithHtml5NumberTypeAndStepAttribute()
18341821
{
1835-
$this->requiresFeatureSet(403);
1836-
18371822
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\NumberType', 1234.56, [
18381823
'html5' => true,
18391824
'attr' => ['step' => '0.1'],
@@ -1908,8 +1893,6 @@ public function testPercent()
19081893

19091894
public function testPercentNoSymbol()
19101895
{
1911-
$this->requiresFeatureSet(403);
1912-
19131896
$form = $this->factory->createNamed('name', PercentType::class, 0.1, ['symbol' => false, 'rounding_mode' => \NumberFormatter::ROUND_CEILING]);
19141897
$this->assertWidgetMatchesXpath($form->createView(), [],
19151898
'/input
@@ -1923,8 +1906,6 @@ public function testPercentNoSymbol()
19231906

19241907
public function testPercentCustomSymbol()
19251908
{
1926-
$this->requiresFeatureSet(403);
1927-
19281909
$form = $this->factory->createNamed('name', PercentType::class, 0.1, ['symbol' => '', 'rounding_mode' => \NumberFormatter::ROUND_CEILING]);
19291910
$this->assertWidgetMatchesXpath($form->createView(), [],
19301911
'/input
@@ -2602,8 +2583,6 @@ public function testColor()
26022583

26032584
public function testLabelWithTranslationParameters()
26042585
{
2605-
$this->requiresFeatureSet(403);
2606-
26072586
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType');
26082587
$html = $this->renderLabel($form->createView(), 'Address is %address%', [
26092588
'label_translation_parameters' => [
@@ -2621,8 +2600,6 @@ public function testLabelWithTranslationParameters()
26212600

26222601
public function testHelpWithTranslationParameters()
26232602
{
2624-
$this->requiresFeatureSet(403);
2625-
26262603
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [
26272604
'help' => 'for company %company%',
26282605
'help_translation_parameters' => [
@@ -2693,8 +2670,6 @@ public function trans(TranslatorInterface $translator, ?string $locale = null):
26932670

26942671
public function testAttributesWithTranslationParameters()
26952672
{
2696-
$this->requiresFeatureSet(403);
2697-
26982673
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\TextType', null, [
26992674
'attr' => [
27002675
'title' => 'Message to %company%',
@@ -2716,8 +2691,6 @@ public function testAttributesWithTranslationParameters()
27162691

27172692
public function testButtonWithTranslationParameters()
27182693
{
2719-
$this->requiresFeatureSet(403);
2720-
27212694
$form = $this->factory->createNamedBuilder('myform')
27222695
->add('mybutton', 'Symfony\Component\Form\Extension\Core\Type\ButtonType', [
27232696
'label' => 'Submit to %company%',
@@ -2741,8 +2714,6 @@ public function testButtonWithTranslationParameters()
27412714
*/
27422715
public function testSubmitFormNoValidate(bool $validate)
27432716
{
2744-
$this->requiresFeatureSet(404);
2745-
27462717
$form = $this->factory->create(SubmitType::class, null, [
27472718
'validate' => $validate,
27482719
]);
@@ -2772,8 +2743,6 @@ public static function submitFormNoValidateProvider()
27722743

27732744
public function testWeekSingleText()
27742745
{
2775-
$this->requiresFeatureSet(404);
2776-
27772746
$form = $this->factory->createNamed('holidays', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '1970-W01', [
27782747
'input' => 'string',
27792748
'widget' => 'single_text',
@@ -2791,8 +2760,6 @@ public function testWeekSingleText()
27912760

27922761
public function testWeekSingleTextNoHtml5()
27932762
{
2794-
$this->requiresFeatureSet(404);
2795-
27962763
$form = $this->factory->createNamed('holidays', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '1970-W01', [
27972764
'input' => 'string',
27982765
'widget' => 'single_text',
@@ -2811,8 +2778,6 @@ public function testWeekSingleTextNoHtml5()
28112778

28122779
public function testWeekChoices()
28132780
{
2814-
$this->requiresFeatureSet(404);
2815-
28162781
$data = ['year' => (int) date('Y'), 'week' => 1];
28172782

28182783
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\WeekType', $data, [
@@ -2837,8 +2802,6 @@ public function testWeekChoices()
28372802

28382803
public function testWeekText()
28392804
{
2840-
$this->requiresFeatureSet(404);
2841-
28422805
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '2000-W01', [
28432806
'input' => 'string',
28442807
'widget' => 'text',

src/Symfony/Component/Form/Test/FormPerformanceTestCase.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
abstract class FormPerformanceTestCase extends FormIntegrationTestCase
2626
{
2727
use RunTestTrait;
28-
use VersionAwareTest;
2928

3029
/**
3130
* @var int

src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTestCase.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
*/
2020
abstract class BaseTypeTestCase extends TypeTestCase
2121
{
22-
use VersionAwareTest;
23-
2422
public const TESTED_TYPE = '';
2523

2624
public function testPassDisabledAsOption()
@@ -114,8 +112,6 @@ public function testDefaultTranslationDomain()
114112

115113
public function testPassLabelTranslationParametersToView()
116114
{
117-
$this->requiresFeatureSet(403);
118-
119115
$view = $this->factory->create($this->getTestedType(), null, array_merge($this->getTestOptions(), [
120116
'label_translation_parameters' => ['%param%' => 'value'],
121117
]))
@@ -126,8 +122,6 @@ public function testPassLabelTranslationParametersToView()
126122

127123
public function testPassAttrTranslationParametersToView()
128124
{
129-
$this->requiresFeatureSet(403);
130-
131125
$view = $this->factory->create($this->getTestedType(), null, array_merge($this->getTestOptions(), [
132126
'attr_translation_parameters' => ['%param%' => 'value'],
133127
]))
@@ -138,8 +132,6 @@ public function testPassAttrTranslationParametersToView()
138132

139133
public function testInheritLabelTranslationParametersFromParent()
140134
{
141-
$this->requiresFeatureSet(403);
142-
143135
$view = $this->factory
144136
->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [
145137
'label_translation_parameters' => ['%param%' => 'value'],
@@ -153,8 +145,6 @@ public function testInheritLabelTranslationParametersFromParent()
153145

154146
public function testInheritAttrTranslationParametersFromParent()
155147
{
156-
$this->requiresFeatureSet(403);
157-
158148
$view = $this->factory
159149
->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [
160150
'attr_translation_parameters' => ['%param%' => 'value'],
@@ -168,8 +158,6 @@ public function testInheritAttrTranslationParametersFromParent()
168158

169159
public function testPreferOwnLabelTranslationParameters()
170160
{
171-
$this->requiresFeatureSet(403);
172-
173161
$view = $this->factory
174162
->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [
175163
'label_translation_parameters' => ['%parent_param%' => 'parent_value', '%override_param%' => 'parent_override_value'],
@@ -185,8 +173,6 @@ public function testPreferOwnLabelTranslationParameters()
185173

186174
public function testPreferOwnAttrTranslationParameters()
187175
{
188-
$this->requiresFeatureSet(403);
189-
190176
$view = $this->factory
191177
->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, [
192178
'attr_translation_parameters' => ['%parent_param%' => 'parent_value', '%override_param%' => 'parent_override_value'],
@@ -202,8 +188,6 @@ public function testPreferOwnAttrTranslationParameters()
202188

203189
public function testDefaultLabelTranslationParameters()
204190
{
205-
$this->requiresFeatureSet(403);
206-
207191
$view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
208192
->add('child', $this->getTestedType(), $this->getTestOptions())
209193
->getForm()
@@ -214,8 +198,6 @@ public function testDefaultLabelTranslationParameters()
214198

215199
public function testDefaultAttrTranslationParameters()
216200
{
217-
$this->requiresFeatureSet(403);
218-
219201
$view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
220202
->add('child', $this->getTestedType(), $this->getTestOptions())
221203
->getForm()

0 commit comments

Comments
 (0)
0