Skip to content

Commit f82a25f

Browse files
committed
fix tests (use non-deprecated options)
* reference form type by its FQCN instead of its string name * use the `entry_type` and `entry_options` options instead of the deprecated `type` and `options` options
1 parent 16ac46b commit f82a25f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ public function testPrototypeSetNotRequired()
365365

366366
public function testPrototypeSetNotRequiredIfParentNotRequired()
367367
{
368-
$child = $this->factory->create('collection', array(), array(
369-
'type' => 'file',
368+
$child = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array(
369+
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\FileType',
370370
'allow_add' => true,
371371
'prototype' => true,
372372
'prototype_name' => '__test__',
373373
));
374374

375-
$parent = $this->factory->create('form', array(), array(
375+
$parent = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', array(), array(
376376
'required' => false,
377377
));
378378

@@ -384,17 +384,17 @@ public function testPrototypeSetNotRequiredIfParentNotRequired()
384384

385385
public function testPrototypeNotOverrideRequiredByEntryOptionsInFavorOfParent()
386386
{
387-
$child = $this->factory->create('collection', array(), array(
388-
'type' => 'file',
387+
$child = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\CollectionType', array(), array(
388+
'entry_type' => 'Symfony\Component\Form\Extension\Core\Type\FileType',
389389
'allow_add' => true,
390390
'prototype' => true,
391391
'prototype_name' => '__test__',
392-
'options' => array(
392+
'entry_options' => array(
393393
'required' => true,
394394
),
395395
));
396396

397-
$parent = $this->factory->create('form', array(), array(
397+
$parent = $this->factory->create('Symfony\Component\Form\Extension\Core\Type\FormType', array(), array(
398398
'required' => false,
399399
));
400400

0 commit comments

Comments
 (0)