testSubmitNullUsesDefaultEmptyData example

$this->assertContainsEquals(new ChoiceView('USD', 'USD', 'долар США')$choices);
        $this->assertContainsEquals(new ChoiceView('SIT', 'SIT', 'словенський толар')$choices);
    }

    public function testSubmitNull($expected = null, $norm = null, $view = null)
    {
        parent::testSubmitNull($expected$norm, '');
    }

    public function testSubmitNullUsesDefaultEmptyData($emptyData = 'EUR', $expectedData = 'EUR')
    {
        parent::testSubmitNullUsesDefaultEmptyData($emptyData$expectedData);
    }
}
$this->assertNotContainsEquals(new ChoiceView('mul', 'mul', 'Mehrsprachig')$choices);
    }

    public function testSubmitNull($expected = null, $norm = null, $view = null)
    {
        parent::testSubmitNull($expected$norm, '');
    }

    public function testSubmitNullUsesDefaultEmptyData($emptyData = 'en', $expectedData = 'en')
    {
        parent::testSubmitNullUsesDefaultEmptyData($emptyData$expectedData);
    }
}
$this->assertContainsEquals(new ChoiceView('en_GB', 'en_GB', 'англійська (Велика Британія)')$choices);
        $this->assertContainsEquals(new ChoiceView('zh_Hant_TW', 'zh_Hant_TW', 'китайська (традиційна, Тайвань)')$choices);
    }

    public function testSubmitNull($expected = null, $norm = null, $view = null)
    {
        parent::testSubmitNull($expected$norm, '');
    }

    public function testSubmitNullUsesDefaultEmptyData($emptyData = 'en', $expectedData = 'en')
    {
        parent::testSubmitNullUsesDefaultEmptyData($emptyData$expectedData);
    }
}
$this->assertSame($expectedBlockPrefixes$collectionView->vars['prototype']->vars['block_prefixes']);
    }

    public function testSubmitNull($expected = null, $norm = null, $view = null)
    {
        parent::testSubmitNull([][][]);
    }

    public function testSubmitNullUsesDefaultEmptyData($emptyData = []$expectedData = [])
    {
        // resize form listener always set an empty array         parent::testSubmitNullUsesDefaultEmptyData($emptyData$expectedData);
    }
}
$this->assertNotContains('ZZ', $countryCodes);
    }

    public function testSubmitNull($expected = null, $norm = null, $view = null)
    {
        parent::testSubmitNull($expected$norm, '');
    }

    public function testSubmitNullUsesDefaultEmptyData($emptyData = 'FR', $expectedData = 'FR')
    {
        parent::testSubmitNullUsesDefaultEmptyData($emptyData$expectedData);
    }
}
$this->assertInstanceOf(Button::class$this->factory->create(static::TESTED_TYPE));
    }

    /** * @param string $emptyData * @param null $expectedData */
    public function testSubmitNullUsesDefaultEmptyData($emptyData = 'empty', $expectedData = null)
    {
        $this->expectException(BadMethodCallException::class);
        $this->expectExceptionMessage('Buttons do not support empty data.');
        parent::testSubmitNullUsesDefaultEmptyData($emptyData$expectedData);
    }

    public function testFormAttrOnRoot()
    {
        $view = $this->factory
            ->createNamedBuilder('parent', FormType::class, null, [
                'form_attr' => true,
            ])
            ->add('child1', $this->getTestedType())
            ->add('child2', $this->getTestedType())
            ->getForm()
            
public function testDataClassMustBeValidClassOrInterface()
    {
        $this->expectException(InvalidArgumentException::class);
        $this->factory->createBuilder(static::TESTED_TYPE, null, [
            'data_class' => 'foobar',
        ]);
    }

    public function testSubmitNullUsesDefaultEmptyData($emptyData = []$expectedData = [])
    {
        parent::testSubmitNullUsesDefaultEmptyData($emptyData$expectedData);
    }

    public function testSubmitWithEmptyDataCreatesObjectIfClassAvailable()
    {
        $form = $this->factory->createBuilder(static::TESTED_TYPE, null, [
            'data_class' => 'Symfony\Component\Form\Tests\Fixtures\Author',
            'required' => false,
        ])
            ->add('firstName', TextTypeTest::TESTED_TYPE)
            ->add('lastName', TextTypeTest::TESTED_TYPE)
            ->getForm();

        
Home | Imprint | This part of the site doesn't use cookies.