protected function setUp() { $factoryMock = $this->getMock('\\Magento\\Framework\\Data\\Form\\Element\\Factory', [], [], '', false); $collectionFactoryMock = $this->getMock('\\Magento\\Framework\\Data\\Form\\Element\\CollectionFactory', [], [], '', false); $escaperMock = $this->getMock('\\Magento\\Framework\\Escaper', [], [], '', false); $this->_model = new \Magento\Framework\Data\Form\Element\Text($factoryMock, $collectionFactoryMock, $escaperMock); $formMock = new \Magento\Framework\DataObject(); $formMock->getHtmlIdPrefix('id_prefix'); $formMock->getHtmlIdPrefix('id_suffix'); $this->_model->setForm($formMock); }
/** * Set form for both fields * * @param Form $form * @return $this */ public function setForm($form) { $this->weightSwitcher->setForm($form); return parent::setForm($form); }
/** * Set form to quantity element in addition to current element * * @param Form $form * @return Form */ public function setForm($form) { $this->_qty->setForm($form); return parent::setForm($form); }
/** * Set form for both fields * * @param Form $form * @return $this */ public function setForm($form) { $this->_virtual->setForm($form); return parent::setForm($form); }