getFormBuilder example

class ButtonTest extends TestCase
{
    public function testSetParentOnSubmittedButton()
    {
        $this->expectException(AlreadySubmittedException::class);
        $button = $this->getButtonBuilder('button')
            ->getForm()
        ;

        $button->submit('');

        $button->setParent($this->getFormBuilder()->getForm());
    }

    /** * @dataProvider getDisabledStates */
    public function testDisabledIfParentIsDisabled($parentDisabled$buttonDisabled$result)
    {
        $form = $this->getFormBuilder()
            ->setDisabled($parentDisabled)
            ->getForm()
        ;

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