From 66e6ad66c028e99019c110631df4c9015af4a2ca Mon Sep 17 00:00:00 2001 From: Sviatoslav Mankivskyi Date: Tue, 17 May 2016 20:14:32 +0300 Subject: [PATCH] MAGETWO-46014: delayed error messages --- app/code/Magento/Theme/Controller/Result/MessagePlugin.php | 2 +- .../Magento/TestFramework/TestCase/AbstractController.php | 2 +- .../testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Theme/Controller/Result/MessagePlugin.php b/app/code/Magento/Theme/Controller/Result/MessagePlugin.php index aae7731ca301e..ab9ae23133946 100644 --- a/app/code/Magento/Theme/Controller/Result/MessagePlugin.php +++ b/app/code/Magento/Theme/Controller/Result/MessagePlugin.php @@ -99,7 +99,7 @@ protected function getMessages() $messages = $this->getCookiesMessages(); /** @var MessageInterface $message */ foreach ($this->messageManager->getMessages(true)->getItems() as $message) { - $messages []= [ + $messages[] = [ 'type' => $message->getType(), 'text' => $this->interpretationStrategy->interpret($message), ]; diff --git a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php index 622050dfc278a..44754d37d4055 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php +++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractController.php @@ -182,7 +182,7 @@ public function assertRedirect(\PHPUnit_Framework_Constraint $urlConstraint = nu } } - /**ishlist/Controller/IndexTest + /** * Assert that actual session messages meet expectations: * Usage examples: * $this->assertSessionMessages($this->isEmpty(), \Magento\Framework\Message\MessageInterface::TYPE_ERROR); diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php index c8660cb759bde..c18880325bb41 100644 --- a/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php +++ b/dev/tests/integration/testsuite/Magento/Paypal/Adminhtml/Paypal/ReportsTest.php @@ -23,7 +23,7 @@ public function testFetchAction() { $this->dispatch('backend/paypal/paypal_reports/fetch'); $this->assertSessionMessages( - $this->equalTo(['We can\'t fetch reports from "login@127.0.0.1."']), + $this->equalTo(['We can\'t fetch reports from "login@127.0.0.1."']), \Magento\Framework\Message\MessageInterface::TYPE_ERROR ); }