1818use Symfony \Component \Form \Extension \Csrf \CsrfExtension ;
1919use Symfony \Component \Form \FormError ;
2020use Symfony \Component \Form \FormView ;
21- use Symfony \Component \Form \Tests \VersionAwareTest ;
2221use Symfony \Component \Security \Csrf \CsrfTokenManagerInterface ;
2322use Symfony \Component \Translation \TranslatableMessage ;
2423use Symfony \Contracts \Translation \TranslatableInterface ;
2524use Symfony \Contracts \Translation \TranslatorInterface ;
2625
2726abstract 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