10000 fixed deprecations in tests · symfony/symfony@f180bfe · GitHub
[go: up one dir, main page]

Skip to content

Commit f180bfe

Browse files
committed
fixed deprecations in tests
1 parent 437acb4 commit f180bfe

File tree

1 file changed

+7
-27
lines changed

1 file changed

+7
-27
lines changed

src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,9 +1887,7 @@ public function testInheritTranslationDomainFromParent()
18871887
->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array(
18881888
'translation_domain' => 'domain',
18891889
))
1890-
->add('child', static::TESTED_TYPE, array(
1891-
'choices_as_values' => true,
1892-
))
1890+
->add('child', static::TESTED_TYPE)
18931891
->getForm()
18941892
->createView();
18951893

@@ -1899,7 +1897,6 @@ public function testInheritTranslationDomainFromParent()
18991897
public function testPassTranslationDomainToView()
19001898
{
19011899
$view = $this->factory->create(static::TESTED_TYPE, null, array(
1902-
'choices_as_values' => true,
19031900
'translation_domain' => 'domain',
19041901
))
19051902
->createView();
@@ -1914,7 +1911,6 @@ public function testPreferOwnTranslationDomain()
19141911
'translation_domain' => 'parent_domain',
19151912
))
19161913
->add('child', static::TESTED_TYPE, array(
1917-
'choices_as_values' => true,
19181914
'translation_domain' => 'domain',
19191915
))
19201916
->getForm()
@@ -1926,9 +1922,7 @@ public function testPreferOwnTranslationDomain()
19261922
public function testDefaultTranslationDomain()
19271923
{
19281924
$view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
1929-
->add('child', static::TESTED_TYPE, array(
1930-
'choices_as_values' => true,
1931-
))
1925+
->add('child', static::TESTED_TYPE)
19321926
->getForm()
19331927
->createView();
19341928

@@ -1937,9 +1931,7 @@ public function testDefaultTranslationDomain()
19371931

19381932
public function testPassMultipartFalseToView()
19391933
{
1940-
$view = $this->factory->create(static::TESTED_TYPE, null, array(
1941-
'choices_as_values' => true,
1942-
))
1934+
$view = $this->factory->create(static::TESTED_TYPE, null)
19431935
->createView();
19441936

19451937
$this->assertFalse($view->vars['multipart']);
@@ -1949,7 +1941,6 @@ public function testPassLabelToView()
19491941
{
19501942
$view = $this->factory->createNamed('__test___field', static::TESTED_TYPE, null, array(
19511943
'label' => 'My label',
1952-
'choices_as_values' => true,
19531944
))
19541945
->createView();
19551946

@@ -1960,9 +1951,7 @@ public function testPassIdAndNameToViewWithGrandParent()
19601951
{
19611952
$builder = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
19621953
->add('child', FormTypeTest::TESTED_TYPE);
1963-
$builder->get('child')->add('grand_child', static::TESTED_TYPE, array(
1964-
'choices_as_values' => true,
1965-
));
1954+
$builder->get('child')->add('grand_child', static::TESTED_TYPE);
19661955
$view = $builder->getForm()->createView();
19671956

19681957
$this->assertEquals('parent_child_grand_child', $view['child']['grand_child']->vars['id']);
@@ -1973,9 +1962,7 @@ public function testPassIdAndNameToViewWithGrandParent()
19731962
public function testPassIdAndNameToViewWithParent()
19741963
{
19751964
$view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
1976-
->add('child', static::TESTED_TYPE, array(
1977-
'choices_as_values' => true,
1978-
))
1965+
->add('child', static::TESTED_TYPE)
19791966
->getForm()
19801967
->createView();
19811968

@@ -1988,17 +1975,14 @@ public function testPassDisabledAsOption()
19881975
{
19891976
$form = $this->factory->create(static::TESTED_TYPE, null, array(
19901977
'disabled' => true,
1991-
'choices_as_values' => true,
19921978
));
19931979

19941980
$this->assertTrue($form->isDisabled());
19951981
}
19961982

19971983
public function testPassIdAndNameToView()
19981984
{
1999-
$view = $this->factory->createNamed('name', static::TESTED_TYPE, null, array(
2000-
'choices_as_values' => true,
2001-
))
1985+
$view = $this->factory->createNamed('name', static::TESTED_TYPE, null)
20021986
->createView();
20031987

20041988
$this->assertEquals('name', $view->vars['id']);
@@ -2008,9 +1992,7 @@ public function testPassIdAndNameToView()
20081992

20091993
public function testStripLeadingUnderscoresAndDigitsFromId()
20101994
{
2011-
$view = $this->factory->createNamed('_09name', static::TESTED_TYPE, null, array(
2012-
'choices_as_values' => true,
2013-
))
1995+
$view = $this->factory->createNamed('_09name', static::TESTED_TYPE, null)
20141996
->createView();
20151997

20161998
$this->assertEquals('name', $view->vars['id']);
@@ -2029,7 +2011,6 @@ public function testTrimIsDisabled($multiple, $expanded)
20292011
'choices' => array(
20302012
'a' => '1',
20312013
),
2032-
'choices_as_values' => true,
20332014
));
20342015

20352016
$submittedData = ' 1';
@@ -2054,7 +2035,6 @@ public function testSubmitValueWithWhiteSpace($multiple, $expanded)
20542035
'choices' => array(
20552036
'a' => $valueWhitWhiteSpace,
20562037
),
2057-
'choices_as_values' => true,
20582038
));
20592039

20602040
$form->submit($multiple ? (array) $valueWhitWhiteSpace : $valueWhitWhiteSpace);

0 commit comments

Comments
 (0)
0