Sonata\tests\Component\Form\EventListener\BasketResizeFormListenerTest::getMockedForm PHP Method

getMockedForm() protected method

protected getMockedForm ( $addIsCalled = true ) : Symfony\Component\Form\FormInterface
return Symfony\Component\Form\FormInterface
    protected function getMockedForm($addIsCalled = true)
    {
        $form = $this->getMockBuilder('Symfony\\Component\\Form\\Form')->disableOriginalConstructor()->getMock();
        if ($addIsCalled) {
            $form->expects($this->once())->method('add');
        }
        return $form;
    }