/** * Retrieve Object instance with original data * * @param \Magento\Framework\Object $object * @return \Magento\Framework\Object */ protected function _getOrigObject($object) { $className = get_class($object); $origObject = $this->_modelFactory->create($className); $origObject->setData(array()); $origObject->setStoreId($object->getStoreId()); $this->load($origObject, $object->getData($this->getEntityIdField())); return $origObject; }
/** * @expectedException \Magento\Framework\Exception\LocalizedException */ public function testExceptionCreate() { $this->factory->create('null', []); }