Skip to content

Commit

Permalink
minor #32725 [Form] skip updated ChoiceType tests on older versions (…
Browse files Browse the repository at this point in the history
…xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

[Form] skip updated ChoiceType tests on older versions

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

3304e57 skip updated ChoiceType tests on older versions
  • Loading branch information
xabbuh committed Jul 24, 2019
2 parents 4260c3b + 3304e57 commit a86cdb5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
*/
private $renderer;

protected static $supportedFeatureSetVersion = 403;
protected static $supportedFeatureSetVersion = 404;

protected function setUp()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
*/
private $renderer;

protected static $supportedFeatureSetVersion = 403;
protected static $supportedFeatureSetVersion = 404;

protected function setUp()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
*/
protected $engine;

protected static $supportedFeatureSetVersion = 403;
protected static $supportedFeatureSetVersion = 404;

protected function getExtensions()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
*/
protected $engine;

protected static $supportedFeatureSetVersion = 403;
protected static $supportedFeatureSetVersion = 404;

public function testStartTagHasNoActionAttributeWhenActionIsEmpty()
{
Expand Down
8 changes: 8 additions & 0 deletions src/Symfony/Component/Form/Tests/AbstractLayoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ public function testSingleExpandedChoiceAttributesWithMainAttributes()

public function testSingleChoiceWithPreferred()
{
$this->requiresFeatureSet(404);

$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [
'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'],
'preferred_choices' => ['&b'],
Expand All @@ -750,6 +752,8 @@ public function testSingleChoiceWithPreferred()

public function testSingleChoiceWithPreferredAndNoSeparator()
{
$this->requiresFeatureSet(404);

$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [
'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'],
'preferred_choices' => ['&b'],
Expand All @@ -773,6 +777,8 @@ public function testSingleChoiceWithPreferredAndNoSeparator()

public function testSingleChoiceWithPreferredAndBlankSeparator()
{
$this->requiresFeatureSet(404);

$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [
'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'],
'preferred_choices' => ['&b'],
Expand All @@ -797,6 +803,8 @@ public function testSingleChoiceWithPreferredAndBlankSeparator()

public function testChoiceWithOnlyPreferred()
{
$this->requiresFeatureSet(404);

$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', '&a', [
'choices' => ['Choice&A' => '&a', 'Choice&B' => '&b'],
'preferred_choices' => ['&a', '&b'],
Expand Down

0 comments on commit a86cdb5

Please sign in to comment.