Skip to content

Commit 9b11931

Browse files
[TwigBridge] Remove VersionAwareTest from AbstractLayoutTestCase
1 parent 5ecc853 commit 9b11931

File tree

3 files changed

+0
-47
lines changed

3 files changed

+0
-47
lines changed

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',

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

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',

0 commit comments

Comments
 (0)