Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function initiatePasswordReset($email, $template, $websiteId = null)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'initiatePasswordReset');
     if (!$pluginInfo) {
         return parent::initiatePasswordReset($email, $template, $websiteId);
     } else {
         return $this->___callPlugins('initiatePasswordReset', func_get_args(), $pluginInfo);
     }
 }
Пример #2
0
 /**
  * @expectedException \Magento\Framework\Exception\InputException
  * @expectedExceptionMessage Invalid value of "" provided for the email type field
  */
 public function testInitiatePasswordResetNoTemplate()
 {
     $storeId = 1;
     $customerId = 1;
     $email = '*****@*****.**';
     $template = null;
     $templateIdentifier = 'Template Identifier';
     $sender = 'Sender';
     mt_srand(mt_rand() + 100000000 * microtime() % PHP_INT_MAX);
     $hash = md5(uniqid(microtime() . mt_rand(0, mt_getrandmax()), true));
     $this->prepareInitiatePasswordReset($email, $templateIdentifier, $sender, $storeId, $customerId, $hash);
     $this->accountManagement->initiatePasswordReset($email, $template);
 }