From 5c41898712935b205ba66df17b9f19b070f82717 Mon Sep 17 00:00:00 2001 From: Vital_Pantsialeyeu Date: Fri, 10 Aug 2018 21:48:41 +0300 Subject: [PATCH] MAGETWO-66666: Adding a product to cart from category page with an expired session does not allow product to be added - Add unit test in case Expired session --- .../Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php b/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php index d2878a7c8dc67..a9c9ecd23d97b 100644 --- a/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php +++ b/app/code/Magento/Checkout/Test/Unit/Controller/Cart/AddTest.php @@ -34,13 +34,18 @@ class AddTest extends \PHPUnit\Framework\TestCase */ private $messageManager; + /** + * Init mocks for tests. + * + * @return void + */ public function setUp() { $this->formKeyValidator = $this->getMockBuilder(\Magento\Framework\Data\Form\FormKey\Validator::class) ->disableOriginalConstructor()->getMock(); $this->resultRedirectFactory = $this->getMockBuilder(\Magento\Framework\Controller\Result\RedirectFactory::class) - ->disableOriginalConstructor()->getMock(); + ->disableOriginalConstructor()->getMock(); $this->request = $this->getMockBuilder(\Magento\Framework\App\RequestInterface::class) ->disableOriginalConstructor()->getmock(); $this->messageManager = $this->getMockBuilder(\Magento\Framework\Message\ManagerInterface::class)