public function testAddEntityFields() { $builder = $this->getMockBuilder('Symfony\\Component\\Form\\FormBuilder')->disableOriginalConstructor()->getMock(); $builder->expects($this->exactly(6))->method('add')->will($this->returnValueMap([[['name', 'text'], $this->returnSelf()], [['account', 'orocrm_account_select'], $this->returnSelf()], [['contact', 'orocrm_contact_select'], $this->returnSelf()], [['channel', 'orocrm_channel_select_type'], $this->returnSelf()], [['shippingAddress', 'oro_address'], $this->returnSelf()], [['billingAddress', 'oro_address'], $this->returnSelf()]])); $type = new B2bCustomerType(); $type->buildForm($builder, []); }
/** * {@inheritdoc} */ public function buildForm(FormBuilderInterface $builder, array $options) { parent::buildForm($builder, $options); $builder->addEventSubscriber(new PatchSubscriber()); }