fixed deprecations in tests
This commit is contained in:
parent
437acb4357
commit
f180bfe2a2
@ -1887,9 +1887,7 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array(
|
->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE, null, array(
|
||||||
'translation_domain' => 'domain',
|
'translation_domain' => 'domain',
|
||||||
))
|
))
|
||||||
->add('child', static::TESTED_TYPE, array(
|
->add('child', static::TESTED_TYPE)
|
||||||
'choices_as_values' => true,
|
|
||||||
))
|
|
||||||
->getForm()
|
->getForm()
|
||||||
->createView();
|
->createView();
|
||||||
|
|
||||||
@ -1899,7 +1897,6 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
public function testPassTranslationDomainToView()
|
public function testPassTranslationDomainToView()
|
||||||
{
|
{
|
||||||
$view = $this->factory->create(static::TESTED_TYPE, null, array(
|
$view = $this->factory->create(static::TESTED_TYPE, null, array(
|
||||||
'choices_as_values' => true,
|
|
||||||
'translation_domain' => 'domain',
|
'translation_domain' => 'domain',
|
||||||
))
|
))
|
||||||
->createView();
|
->createView();
|
||||||
@ -1914,7 +1911,6 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
'translation_domain' => 'parent_domain',
|
'translation_domain' => 'parent_domain',
|
||||||
))
|
))
|
||||||
->add('child', static::TESTED_TYPE, array(
|
->add('child', static::TESTED_TYPE, array(
|
||||||
'choices_as_values' => true,
|
|
||||||
'translation_domain' => 'domain',
|
'translation_domain' => 'domain',
|
||||||
))
|
))
|
||||||
->getForm()
|
->getForm()
|
||||||
@ -1926,9 +1922,7 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
public function testDefaultTranslationDomain()
|
public function testDefaultTranslationDomain()
|
||||||
{
|
{
|
||||||
$view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
|
$view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
|
||||||
->add('child', static::TESTED_TYPE, array(
|
->add('child', static::TESTED_TYPE)
|
||||||
'choices_as_values' => true,
|
|
||||||
))
|
|
||||||
->getForm()
|
->getForm()
|
||||||
->createView();
|
->createView();
|
||||||
|
|
||||||
@ -1937,9 +1931,7 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
|
|
||||||
public function testPassMultipartFalseToView()
|
public function testPassMultipartFalseToView()
|
||||||
{
|
{
|
||||||
$view = $this->factory->create(static::TESTED_TYPE, null, array(
|
$view = $this->factory->create(static::TESTED_TYPE, null)
|
||||||
'choices_as_values' => true,
|
|
||||||
))
|
|
||||||
->createView();
|
->createView();
|
||||||
|
|
||||||
$this->assertFalse($view->vars['multipart']);
|
$this->assertFalse($view->vars['multipart']);
|
||||||
@ -1949,7 +1941,6 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
{
|
{
|
||||||
$view = $this->factory->createNamed('__test___field', static::TESTED_TYPE, null, array(
|
$view = $this->factory->createNamed('__test___field', static::TESTED_TYPE, null, array(
|
||||||
'label' => 'My label',
|
'label' => 'My label',
|
||||||
'choices_as_values' => true,
|
|
||||||
))
|
))
|
||||||
->createView();
|
->createView();
|
||||||
|
|
||||||
@ -1960,9 +1951,7 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
{
|
{
|
||||||
$builder = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
|
$builder = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
|
||||||
->add('child', FormTypeTest::TESTED_TYPE);
|
->add('child', FormTypeTest::TESTED_TYPE);
|
||||||
$builder->get('child')->add('grand_child', static::TESTED_TYPE, array(
|
$builder->get('child')->add('grand_child', static::TESTED_TYPE);
|
||||||
'choices_as_values' => true,
|
|
||||||
));
|
|
||||||
$view = $builder->getForm()->createView();
|
$view = $builder->getForm()->createView();
|
||||||
|
|
||||||
$this->assertEquals('parent_child_grand_child', $view['child']['grand_child']->vars['id']);
|
$this->assertEquals('parent_child_grand_child', $view['child']['grand_child']->vars['id']);
|
||||||
@ -1973,9 +1962,7 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
public function testPassIdAndNameToViewWithParent()
|
public function testPassIdAndNameToViewWithParent()
|
||||||
{
|
{
|
||||||
$view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
|
$view = $this->factory->createNamedBuilder('parent', FormTypeTest::TESTED_TYPE)
|
||||||
->add('child', static::TESTED_TYPE, array(
|
->add('child', static::TESTED_TYPE)
|
||||||
'choices_as_values' => true,
|
|
||||||
))
|
|
||||||
->getForm()
|
->getForm()
|
||||||
->createView();
|
->createView();
|
||||||
|
|
||||||
@ -1988,7 +1975,6 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
{
|
{
|
||||||
$form = $this->factory->create(static::TESTED_TYPE, null, array(
|
$form = $this->factory->create(static::TESTED_TYPE, null, array(
|
||||||
'disabled' => true,
|
'disabled' => true,
|
||||||
'choices_as_values' => true,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$this->assertTrue($form->isDisabled());
|
$this->assertTrue($form->isDisabled());
|
||||||
@ -1996,9 +1982,7 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
|
|
||||||
public function testPassIdAndNameToView()
|
public function testPassIdAndNameToView()
|
||||||
{
|
{
|
||||||
$view = $this->factory->createNamed('name', static::TESTED_TYPE, null, array(
|
$view = $this->factory->createNamed('name', static::TESTED_TYPE, null)
|
||||||
'choices_as_values' => true,
|
|
||||||
))
|
|
||||||
->createView();
|
->createView();
|
||||||
|
|
||||||
$this->assertEquals('name', $view->vars['id']);
|
$this->assertEquals('name', $view->vars['id']);
|
||||||
@ -2008,9 +1992,7 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
|
|
||||||
public function testStripLeadingUnderscoresAndDigitsFromId()
|
public function testStripLeadingUnderscoresAndDigitsFromId()
|
||||||
{
|
{
|
||||||
$view = $this->factory->createNamed('_09name', static::TESTED_TYPE, null, array(
|
$view = $this->factory->createNamed('_09name', static::TESTED_TYPE, null)
|
||||||
'choices_as_values' => true,
|
|
||||||
))
|
|
||||||
->createView();
|
->createView();
|
||||||
|
|
||||||
$this->assertEquals('name', $view->vars['id']);
|
$this->assertEquals('name', $view->vars['id']);
|
||||||
@ -2029,7 +2011,6 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
'choices' => array(
|
'choices' => array(
|
||||||
'a' => '1',
|
'a' => '1',
|
||||||
),
|
),
|
||||||
'choices_as_values' => true,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$submittedData = ' 1';
|
$submittedData = ' 1';
|
||||||
@ -2054,7 +2035,6 @@ class ChoiceTypeTest extends BaseTypeTest
|
|||||||
'choices' => array(
|
'choices' => array(
|
||||||
'a' => $valueWhitWhiteSpace,
|
'a' => $valueWhitWhiteSpace,
|
||||||
),
|
),
|
||||||
'choices_as_values' => true,
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$form->submit($multiple ? (array) $valueWhitWhiteSpace : $valueWhitWhiteSpace);
|
$form->submit($multiple ? (array) $valueWhitWhiteSpace : $valueWhitWhiteSpace);
|
||||||
|
Reference in New Issue
Block a user