diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php index 6fb468b9dd7c..66654d9ce589 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php @@ -2771,11 +2771,11 @@ public function testWeekChoices() { $this->requiresFeatureSet(404); - $data = ['year' => date('Y'), 'week' => 1]; + $data = ['year' => (int) date('Y'), 'week' => 1]; $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\WeekType', $data, [ 'input' => 'array', - 'required' => false, + 'widget' => 'choice', ]); $this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']], diff --git a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php index c565894ccc51..2baf51ac2b97 100644 --- a/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractLayoutTest.php @@ -2768,6 +2768,8 @@ public function submitFormNoValidateProvider() public function testWeekSingleText() { + $this->requiresFeatureSet(404); + $form = $this->factory->createNamed('holidays', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '1970-W01', [ 'input' => 'string', 'widget' => 'single_text', @@ -2785,6 +2787,8 @@ public function testWeekSingleText() public function testWeekSingleTextNoHtml5() { + $this->requiresFeatureSet(404); + $form = $this->factory->createNamed('holidays', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '1970-W01', [ 'input' => 'string', 'widget' => 'single_text', @@ -2803,11 +2807,13 @@ public function testWeekSingleTextNoHtml5() public function testWeekChoices() { - $data = ['year' => date('Y'), 'week' => 1]; + $this->requiresFeatureSet(404); + + $data = ['year' => (int) date('Y'), 'week' => 1]; $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\WeekType', $data, [ 'input' => 'array', - 'required' => false, + 'widget' => 'choice', ]); $this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']], @@ -2827,6 +2833,8 @@ public function testWeekChoices() public function testWeekText() { + $this->requiresFeatureSet(404); + $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\WeekType', '2000-W01', [ 'input' => 'string', 'widget' => 'text',