Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * @expectedException \Magento\Framework\Exception\LocalizedException
  */
 public function testExceptionCreate()
 {
     $this->factory->create('null', []);
 }