18
18
use Symfony \Component \Form \Extension \Csrf \CsrfExtension ;
19
19
use Symfony \Component \Form \FormError ;
20
20
use Symfony \Component \Form \FormView ;
21
- use Symfony \Component \Form \Tests \VersionAwareTest ;
22
21
use Symfony \Component \Security \Csrf \CsrfTokenManagerInterface ;
23
22
use Symfony \Component \Translation \TranslatableMessage ;
24
23
use Symfony \Contracts \Translation \TranslatableInterface ;
25
24
use Symfony \Contracts \Translation \TranslatorInterface ;
26
25
27
26
abstract class AbstractLayoutTestCase extends FormLayoutTestCase
28
27
{
29
- use VersionAwareTest;
30
-
31
28
protected MockObject &CsrfTokenManagerInterface $ csrfTokenManager ;
32
29
protected array $ testableFeatures = [];
33
30
@@ -672,8 +669,6 @@ public function testSingleExpandedChoiceAttributesWithMainAttributes()
672
669
673
670
public function testSingleChoiceWithPreferred ()
674
671
{
675
- $ this ->requiresFeatureSet (404 );
676
-
677
672
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , [
678
673
'choices ' => ['Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ],
679
674
'preferred_choices ' => ['&b ' ],
@@ -698,8 +693,6 @@ public function testSingleChoiceWithPreferred()
698
693
699
694
public function testSingleChoiceWithPreferredAndNoSeparator ()
700
695
{
701
- $ this ->requiresFeatureSet (404 );
702
-
703
696
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , [
704
697
'choices ' => ['Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ],
705
698
'preferred_choices ' => ['&b ' ],
@@ -723,8 +716,6 @@ public function testSingleChoiceWithPreferredAndNoSeparator()
723
716
724
717
public function testSingleChoiceWithPreferredAndBlankSeparator ()
725
718
{
726
- $ this ->requiresFeatureSet (404 );
727
-
728
719
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , [
729
720
'choices ' => ['Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ],
730
721
'preferred_choices ' => ['&b ' ],
@@ -749,8 +740,6 @@ public function testSingleChoiceWithPreferredAndBlankSeparator()
749
740
750
741
public function testChoiceWithOnlyPreferred ()
751
742
{
752
- $ this ->requiresFeatureSet (404 );
753
-
754
743
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , [
755
744
'choices ' => ['Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ],
756
745
'preferred_choices ' => ['&a ' , '&b ' ],
@@ -1814,8 +1803,6 @@ public function testNumber()
1814
1803
1815
1804
public function testRenderNumberWithHtml5NumberType ()
1816
1805
{
1817
- $ this ->requiresFeatureSet (403 );
1818
-
1819
1806
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\NumberType ' , 1234.56 , [
1820
1807
'html5 ' => true ,
1821
1808
]);
@@ -1832,8 +1819,6 @@ public function testRenderNumberWithHtml5NumberType()
1832
1819
1833
1820
public function testRenderNumberWithHtml5NumberTypeAndStepAttribute ()
1834
1821
{
1835
- $ this ->requiresFeatureSet (403 );
1836
-
1837
1822
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\NumberType ' , 1234.56 , [
1838
1823
'html5 ' => true ,
1839
1824
'attr ' => ['step ' => '0.1 ' ],
@@ -1908,8 +1893,6 @@ public function testPercent()
1908
1893
1909
1894
public function testPercentNoSymbol ()
1910
1895
{
1911
- $ this ->requiresFeatureSet (403 );
1912
-
1913
1896
$ form = $ this ->factory ->createNamed ('name ' , PercentType::class, 0.1 , ['symbol ' => false , 'rounding_mode ' => \NumberFormatter::ROUND_CEILING ]);
1914
1897
$ this ->assertWidgetMatchesXpath ($ form ->createView (), [],
1915
1898
'/input
@@ -1923,8 +1906,6 @@ public function testPercentNoSymbol()
1923
1906
1924
1907
public function testPercentCustomSymbol ()
1925
1908
{
1926
- $ this ->requiresFeatureSet (403 );
1927
-
1928
1909
$ form = $ this ->factory ->createNamed ('name ' , PercentType::class, 0.1 , ['symbol ' => '‱ ' , 'rounding_mode ' => \NumberFormatter::ROUND_CEILING ]);
1929
1910
$ this ->assertWidgetMatchesXpath ($ form ->createView (), [],
1930
1911
'/input
@@ -2602,8 +2583,6 @@ public function testColor()
2602
2583
2603
2584
public function testLabelWithTranslationParameters ()
2604
2585
{
2605
- $ this ->requiresFeatureSet (403 );
2606
-
2607
2586
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\TextType ' );
2608
2587
$ html = $ this ->renderLabel ($ form ->createView (), 'Address is %address% ' , [
2609
2588
'label_translation_parameters ' => [
@@ -2621,8 +2600,6 @@ public function testLabelWithTranslationParameters()
2621
2600
2622
2601
public function testHelpWithTranslationParameters ()
2623
2602
{
2624
- $ this ->requiresFeatureSet (403 );
2625
-
2626
2603
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\TextType ' , null , [
2627
2604
'help ' => 'for company %company% ' ,
2628
2605
'help_translation_parameters ' => [
@@ -2693,8 +2670,6 @@ public function trans(TranslatorInterface $translator, ?string $locale = null):
2693
2670
2694
2671
public function testAttributesWithTranslationParameters ()
2695
2672
{
2696
- $ this ->requiresFeatureSet (403 );
2697
-
2698
2673
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\TextType ' , null , [
2699
2674
'attr ' => [
2700
2675
'title ' => 'Message to %company% ' ,
@@ -2716,8 +2691,6 @@ public function testAttributesWithTranslationParameters()
2716
2691
2717
2692
public function testButtonWithTranslationParameters ()
2718
2693
{
2719
- $ this ->requiresFeatureSet (403 );
2720
-
2721
2694
$ form = $ this ->factory ->createNamedBuilder ('myform ' )
2722
2695
->add ('mybutton ' , 'Symfony\Component\Form\Extension\Core\Type\ButtonType ' , [
2723
2696
'label ' => 'Submit to %company% ' ,
@@ -2741,8 +2714,6 @@ public function testButtonWithTranslationParameters()
2741
2714
*/
2742
2715
public function testSubmitFormNoValidate (bool $ validate )
2743
2716
{
2744
- $ this ->requiresFeatureSet (404 );
2745
-
2746
2717
$ form = $ this ->factory ->create (SubmitType::class, null , [
2747
2718
'validate ' => $ validate ,
2748
2719
]);
@@ -2772,8 +2743,6 @@ public static function submitFormNoValidateProvider()
2772
2743
2773
2744
public function testWeekSingleText ()
2774
2745
{
2775
- $ this ->requiresFeatureSet (404 );
2776
-
2777
2746
$ form = $ this ->factory ->createNamed ('holidays ' , 'Symfony\Component\Form\Extension\Core\Type\WeekType ' , '1970-W01 ' , [
2778
2747
'input ' => 'string ' ,
2779
2748
'widget ' => 'single_text ' ,
@@ -2791,8 +2760,6 @@ public function testWeekSingleText()
2791
2760
2792
2761
public function testWeekSingleTextNoHtml5 ()
2793
2762
{
2794
- $ this ->requiresFeatureSet (404 );
2795
-
2796
2763
$ form = $ this ->factory ->createNamed ('holidays ' , 'Symfony\Component\Form\Extension\Core\Type\WeekType ' , '1970-W01 ' , [
2797
2764
'input ' => 'string ' ,
2798
2765
'widget ' => 'single_text ' ,
@@ -2811,8 +2778,6 @@ public function testWeekSingleTextNoHtml5()
2811
2778
2812
2779
public function testWeekChoices ()
2813
2780
{
2814
- $ this ->requiresFeatureSet (404 );
2815
-
2816
2781
$ data = ['year ' => (int ) date ('Y ' ), 'week ' => 1 ];
2817
2782
2818
2783
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\WeekType ' , $ data , [
@@ -2837,8 +2802,6 @@ public function testWeekChoices()
2837
2802
2838
2803
public function testWeekText ()
2839
2804
{
2840
- $ this ->requiresFeatureSet (404 );
2841
-
2842
2805
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\WeekType ' , '2000-W01 ' , [
2843
2806
'input ' => 'string ' ,
2844
2807
'widget ' => 'text ' ,
0 commit comments