diff --git a/app/code/Magento/Newsletter/Controller/Manage/Save.php b/app/code/Magento/Newsletter/Controller/Manage/Save.php index 947c27ee45c82..419cbac10ffd1 100644 --- a/app/code/Magento/Newsletter/Controller/Manage/Save.php +++ b/app/code/Magento/Newsletter/Controller/Manage/Save.php @@ -80,24 +80,24 @@ public function execute() ->getIsSubscribed(); $isSubscribedParam = (boolean)$this->getRequest() ->getParam('is_subscribed', false); - if ($isSubscribedParam != $isSubscribedState) { + if ($isSubscribedParam !== $isSubscribedState) { $this->customerRepository->save($customer); if ($isSubscribedParam) { $subscribeModel = $this->subscriberFactory->create() ->subscribeCustomerById($customerId); $subscribeStatus = $subscribeModel->getStatus(); if ($subscribeStatus == Subscriber::STATUS_SUBSCRIBED) { - $this->messageManager->addSuccess(__('We saved the subscription.')); + $this->messageManager->addSuccess(__('We have saved your subscription.')); } else { - $this->messageManager->addSuccess(__('The confirmation request has been sent.')); + $this->messageManager->addSuccess(__('A confirmation request has been sent.')); } } else { $this->subscriberFactory->create() ->unsubscribeCustomerById($customerId); - $this->messageManager->addSuccess(__('We removed the subscription.')); + $this->messageManager->addSuccess(__('We have removed your newsletter subscription.')); } } else { - $this->messageManager->addSuccess(__('We updated the subscription.')); + $this->messageManager->addSuccess(__('We have updated your subscription.')); } } catch (\Exception $e) { $this->messageManager->addError(__('Something went wrong while saving your subscription.')); diff --git a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php index 35d89256c283a..90892be1327c9 100644 --- a/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php +++ b/dev/tests/integration/testsuite/Magento/Newsletter/Controller/ManageTest.php @@ -58,7 +58,7 @@ public function testSaveAction() * Check that success message */ $this->assertSessionMessages( - $this->equalTo(['We saved the subscription.']), + $this->equalTo(['We have saved your subscription.']), \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); } @@ -85,7 +85,7 @@ public function testSaveActionRemoveSubscription() * Check that success message */ $this->assertSessionMessages( - $this->equalTo(['We updated the subscription.']), + $this->equalTo(['We have updated your subscription.']), \Magento\Framework\Message\MessageInterface::TYPE_SUCCESS ); }