19
19
use Symfony \Component \Form \FormError ;
20
20
use Symfony \Component \Form \FormExtensionInterface ;
21
21
use Symfony \Component \Form \FormView ;
22
- use Symfony \Component \Form \Tests \VersionAwareTest ;
23
22
use Symfony \Component \Security \Csrf \CsrfTokenManagerInterface ;
24
23
use Symfony \Component \Translation \TranslatableMessage ;
25
24
use Symfony \Contracts \Translation \TranslatableInterface ;
26
25
use Symfony \Contracts \Translation \TranslatorInterface ;
27
26
28
27
abstract class AbstractLayoutTestCase extends FormLayoutTestCase
29
28
{
30
- use VersionAwareTest;
31
-
32
29
protected MockObject &CsrfTokenManagerInterface $ csrfTokenManager ;
33
30
protected array $ testableFeatures = [];
34
31
@@ -676,8 +673,6 @@ public function testSingleExpandedChoiceAttributesWithMainAttributes()
676
673
677
674
public function testSingleChoiceWithPreferred ()
678
675
{
679
- $ this ->requiresFeatureSet (404 );
680
-
681
676
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , [
682
677
'choices ' => ['Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ],
683
678
'preferred_choices ' => ['&b ' ],
@@ -702,8 +697,6 @@ public function testSingleChoiceWithPreferred()
702
697
703
698
public function testSingleChoiceWithPreferredAndNoSeparator ()
704
699
{
705
- $ this ->requiresFeatureSet (404 );
706
-
707
700
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , [
708
701
'choices ' => ['Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ],
709
702
'preferred_choices ' => ['&b ' ],
@@ -727,8 +720,6 @@ public function testSingleChoiceWithPreferredAndNoSeparator()
727
720
728
721
public function testSingleChoiceWithPreferredAndBlankSeparator ()
729
722
{
730
- $ this ->requiresFeatureSet (404 );
731
-
732
723
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , [
733
724
'choices ' => ['Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ],
734
725
'preferred_choices ' => ['&b ' ],
@@ -753,8 +744,6 @@ public function testSingleChoiceWithPreferredAndBlankSeparator()
753
744
754
745
public function testChoiceWithOnlyPreferred ()
755
746
{
756
- $ this ->requiresFeatureSet (404 );
757
-
758
747
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\ChoiceType ' , '&a ' , [
759
748
'choices ' => ['Choice&A ' => '&a ' , 'Choice&B ' => '&b ' ],
760
749
'preferred_choices ' => ['&a ' , '&b ' ],
@@ -1818,8 +1807,6 @@ public function testNumber()
1818
1807
1819
1808
public function testRenderNumberWithHtml5NumberType ()
1820
1809
{
1821
- $ this ->requiresFeatureSet (403 );
1822
-
1823
1810
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\NumberType ' , 1234.56 , [
1824
1811
'html5 ' => true ,
1825
1812
]);
@@ -1836,8 +1823,6 @@ public function testRenderNumberWithHtml5NumberType()
1836
1823
1837
1824
public function testRenderNumberWithHtml5NumberTypeAndStepAttribute ()
1838
1825
{
1839
- $ this ->requiresFeatureSet (403 );
1840
-
1841
1826
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\NumberType ' , 1234.56 , [
1842
1827
'html5 ' => true ,
1843
1828
'attr ' => ['step ' => '0.1 ' ],
@@ -1912,8 +1897,6 @@ public function testPercent()
1912
1897
1913
1898
public function testPercentNoSymbol ()
1914
1899
{
1915
- $ this ->requiresFeatureSet (403 );
1916
-
1917
1900
$ form = $ this ->factory ->createNamed ('name ' , PercentType::class, 0.1 , ['symbol ' => false , 'rounding_mode ' => \NumberFormatter::ROUND_CEILING ]);
1918
1901
$ this ->assertWidgetMatchesXpath ($ form ->createView (), [],
1919
1902
'/input
@@ -1927,8 +1910,6 @@ public function testPercentNoSymbol()
1927
1910
1928
1911
public function testPercentCustomSymbol ()
1929
1912
{
1930
- $ this ->requiresFeatureSet (403 );
1931
-
1932
1913
$ form = $ this ->factory ->createNamed ('name ' , PercentType::class, 0.1 , ['symbol ' => '‱ ' , 'rounding_mode ' => \NumberFormatter::ROUND_CEILING ]);
1933
1914
$ this ->assertWidgetMatchesXpath ($ form ->createView (), [],
1934
1915
'/input
@@ -2606,8 +2587,6 @@ public function testColor()
2606
2587
2607
2588
public function testLabelWithTranslationParameters ()
2608
2589
{
2609
- $ this ->requiresFeatureSet (403 );
2610
-
2611
2590
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\TextType ' );
2612
2591
$ html = $ this ->renderLabel ($ form ->createView (), 'Address is %address% ' , [
2613
2592
'label_translation_parameters ' => [
@@ -2625,8 +2604,6 @@ public function testLabelWithTranslationParameters()
2625
2604
2626
2605
public function testHelpWithTranslationParameters ()
2627
2606
{
2628
- $ this ->requiresFeatureSet (403 );
2629
-
2630
2607
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\TextType ' , null , [
2631
2608
'help ' => 'for company %company% ' ,
2632
2609
'help_translation_parameters ' => [
@@ -2697,8 +2674,6 @@ public function trans(TranslatorInterface $translator, ?string $locale = null):
2697
2674
2698
2675
public function testAttributesWithTranslationParameters ()
2699
2676
{
2700
- $ this ->requiresFeatureSet (403 );
2701
-
2702
2677
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\TextType ' , null , [
2703
2678
'attr ' => [
2704
2679
'title ' => 'Message to %company% ' ,
@@ -2720,8 +2695,6 @@ public function testAttributesWithTranslationParameters()
2720
2695
2721
2696
public function testButtonWithTranslationParameters ()
2722
2697
{
2723
- $ this ->requiresFeatureSet (403 );
2724
-
2725
2698
$ form = $ this ->factory ->createNamedBuilder ('myform ' )
2726
2699
->add ('mybutton ' , 'Symfony\Component\Form\Extension\Core\Type\ButtonType ' , [
2727
2700
'label ' => 'Submit to %company% ' ,
@@ -2745,8 +2718,6 @@ public function testButtonWithTranslationParameters()
2745
2718
*/
2746
2719
public function testSubmitFormNoValidate (bool $ validate )
2747
2720
{
2748
- $ this ->requiresFeatureSet (404 );
2749
-
2750
2721
$ form = $ this ->factory ->create (SubmitType::class, null , [
2751
2722
'validate ' => $ validate ,
2752
2723
]);
@@ -2776,8 +2747,6 @@ public static function submitFormNoValidateProvider()
2776
2747
2777
2748
public function testWeekSingleText ()
2778
2749
{
2779
- $ this ->requiresFeatureSet (404 );
2780
-
2781
2750
$ form = $ this ->factory ->createNamed ('holidays ' , 'Symfony\Component\Form\Extension\Core\Type\WeekType ' , '1970-W01 ' , [
2782
2751
'input ' => 'string ' ,
2783
2752
'widget ' => 'single_text ' ,
@@ -2795,8 +2764,6 @@ public function testWeekSingleText()
2795
2764
2796
2765
public function testWeekSingleTextNoHtml5 ()
2797
2766
{
2798
- $ this ->requiresFeatureSet (404 );
2799
-
2800
2767
$ form = $ this ->factory ->createNamed ('holidays ' , 'Symfony\Component\Form\Extension\Core\Type\WeekType ' , '1970-W01 ' , [
2801
2768
'input ' => 'string ' ,
2802
2769
'widget ' => 'single_text ' ,
@@ -2815,8 +2782,6 @@ public function testWeekSingleTextNoHtml5()
2815
2782
2816
2783
public function testWeekChoices ()
2817
2784
{
2818
- $ this ->requiresFeatureSet (404 );
2819
-
2820
2785
$ data = ['year ' => (int ) date ('Y ' ), 'week ' => 1 ];
2821
2786
2822
2787
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\WeekType ' , $ data , [
@@ -2841,8 +2806,6 @@ public function testWeekChoices()
2841
2806
2842
2807
public function testWeekText ()
2843
2808
{
2844
- $ this ->requiresFeatureSet (404 );
2845
-
2846
2809
$ form = $ this ->factory ->createNamed ('name ' , 'Symfony\Component\Form\Extension\Core\Type\WeekType ' , '2000-W01 ' , [
2847
2810
'input ' => 'string ' ,
2848
2811
'widget ' => 'text ' ,
0 commit comments