public function testPopulateInput() { $params = ['type' => 'multiselect', 'can_be_empty' => true, 'source_model' => 'some_model', 'someArr' => ['testVar' => 'testVal']]; $this->_model->setData($params, 'scope'); $elementMock = $this->getMock('Magento\\Framework\\Data\\Form\\Element\\Text', ['setOriginalData'], [], '', false); unset($params['someArr']); $elementMock->expects($this->once())->method('setOriginalData')->with($params); $this->_model->populateInput($elementMock); }
/** * {@inheritdoc} */ public function populateInput($formField) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'populateInput'); if (!$pluginInfo) { return parent::populateInput($formField); } else { return $this->___callPlugins('populateInput', func_get_args(), $pluginInfo); } }