作者:nja7
项目:magento
public function setUp()
{
$objectManagerHelper = new ObjectManagerHelper($this);
$this->contextMock = $this->getMock('Magento\\Backend\\App\\Action\\Context', ['getRequest', 'getResponse', 'getMessageManager', 'getRedirect', 'getObjectManager', 'getSession', 'getActionFlag', 'getHelper', 'getResultRedirectFactory', 'getResultFactory'], [], '', false);
$resultRedirectFactory = $this->getMock('Magento\\Backend\\Model\\View\\Result\\RedirectFactory', ['create'], [], '', false);
$this->responseMock = $this->getMock('Magento\\Framework\\App\\ResponseInterface', ['setRedirect', 'sendResponse'], [], '', false);
$this->requestMock = $this->getMockBuilder('Magento\\Framework\\App\\Request\\Http')->disableOriginalConstructor()->getMock();
$this->objectManagerMock = $this->getMock('Magento\\Framework\\ObjectManager\\ObjectManager', ['create'], [], '', false);
$this->messageManagerMock = $this->getMock('Magento\\Framework\\Message\\Manager', ['addSuccess', 'addError'], [], '', false);
$this->orderCollectionMock = $this->getMockBuilder('Magento\\Sales\\Model\\Resource\\Order\\Collection')->disableOriginalConstructor()->getMock();
$this->sessionMock = $this->getMock('Magento\\Backend\\Model\\Session', ['setIsUrlNotice'], [], '', false);
$this->actionFlagMock = $this->getMock('Magento\\Framework\\App\\ActionFlag', ['get', 'set'], [], '', false);
$this->helperMock = $this->getMock('\\Magento\\Backend\\Helper\\Data', ['getUrl'], [], '', false);
$this->resultRedirectMock = $this->getMock('Magento\\Backend\\Model\\View\\Result\\Redirect', [], [], '', false);
$resultRedirectFactory->expects($this->any())->method('create')->willReturn($this->resultRedirectMock);
$redirectMock = $this->getMockBuilder('Magento\\Backend\\Model\\View\\Result\\Redirect')->disableOriginalConstructor()->getMock();
$resultFactoryMock = $this->getMockBuilder('Magento\\Framework\\Controller\\ResultFactory')->disableOriginalConstructor()->getMock();
$resultFactoryMock->expects($this->any())->method('create')->with(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT)->willReturn($redirectMock);
$this->contextMock->expects($this->once())->method('getMessageManager')->willReturn($this->messageManagerMock);
$this->contextMock->expects($this->once())->method('getRequest')->willReturn($this->requestMock);
$this->contextMock->expects($this->once())->method('getResponse')->willReturn($this->responseMock);
$this->contextMock->expects($this->once())->method('getObjectManager')->willReturn($this->objectManagerMock);
$this->contextMock->expects($this->once())->method('getSession')->willReturn($this->sessionMock);
$this->contextMock->expects($this->once())->method('getActionFlag')->willReturn($this->actionFlagMock);
$this->contextMock->expects($this->once())->method('getHelper')->willReturn($this->helperMock);
$this->contextMock->expects($this->once())->method('getResultRedirectFactory')->willReturn($resultRedirectFactory);
$this->contextMock->expects($this->any())->method('getResultFactory')->willReturn($resultFactoryMock);
$this->massAction = $objectManagerHelper->getObject('Magento\\Sales\\Controller\\Adminhtml\\Order\\MassCancel', ['context' => $this->contextMock]);
}
作者:tingyee
项目:magento
public function setUp()
{
$objectManagerHelper = new ObjectManagerHelper($this);
$this->contextMock = $this->getMock('Magento\\Backend\\App\\Action\\Context', [], [], '', false);
$resultRedirectFactory = $this->getMock('Magento\\Backend\\Model\\View\\Result\\RedirectFactory', [], [], '', false);
$this->responseMock = $this->getMock('Magento\\Framework\\App\\ResponseInterface', [], [], '', false);
$this->requestMock = $this->getMockBuilder('Magento\\Framework\\App\\Request\\Http')->disableOriginalConstructor()->getMock();
$this->objectManagerMock = $this->getMock('Magento\\Framework\\ObjectManager\\ObjectManager', ['create'], [], '', false);
$this->messageManagerMock = $this->getMock('Magento\\Framework\\Message\\Manager', [], [], '', false);
$this->customerCollectionMock = $this->getMockBuilder('Magento\\Customer\\Model\\ResourceModel\\Customer\\Collection')->disableOriginalConstructor()->getMock();
$this->customerCollectionFactoryMock = $this->getMockBuilder('Magento\\Customer\\Model\\ResourceModel\\Customer\\CollectionFactory')->disableOriginalConstructor()->setMethods(['create'])->getMock();
$redirectMock = $this->getMockBuilder('Magento\\Backend\\Model\\View\\Result\\Redirect')->disableOriginalConstructor()->getMock();
$resultFactoryMock = $this->getMockBuilder('Magento\\Framework\\Controller\\ResultFactory')->disableOriginalConstructor()->getMock();
$resultFactoryMock->expects($this->any())->method('create')->with(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT)->willReturn($redirectMock);
$this->subscriberMock = $this->getMock('Magento\\Newsletter\\Model\\Subscriber', [], [], '', false);
$subscriberFactoryMock = $this->getMockBuilder('Magento\\Newsletter\\Model\\SubscriberFactory')->setMethods(['create'])->disableOriginalConstructor()->getMock();
$subscriberFactoryMock->expects($this->any())->method('create')->willReturn($this->subscriberMock);
$this->resultRedirectMock = $this->getMock('Magento\\Backend\\Model\\View\\Result\\Redirect', [], [], '', false);
$resultRedirectFactory->expects($this->any())->method('create')->willReturn($this->resultRedirectMock);
$this->contextMock->expects($this->once())->method('getMessageManager')->willReturn($this->messageManagerMock);
$this->contextMock->expects($this->once())->method('getRequest')->willReturn($this->requestMock);
$this->contextMock->expects($this->once())->method('getResponse')->willReturn($this->responseMock);
$this->contextMock->expects($this->once())->method('getObjectManager')->willReturn($this->objectManagerMock);
$this->contextMock->expects($this->any())->method('getResultRedirectFactory')->willReturn($resultRedirectFactory);
$this->contextMock->expects($this->any())->method('getResultFactory')->willReturn($resultFactoryMock);
$this->filterMock = $this->getMock('Magento\\Ui\\Component\\MassAction\\Filter', [], [], '', false);
$this->filterMock->expects($this->once())->method('getCollection')->with($this->customerCollectionMock)->willReturnArgument(0);
$this->customerCollectionFactoryMock->expects($this->once())->method('create')->willReturn($this->customerCollectionMock);
$this->customerRepositoryMock = $this->getMockBuilder('Magento\\Customer\\Api\\CustomerRepositoryInterface')->getMockForAbstractClass();
$this->massAction = $objectManagerHelper->getObject('Magento\\Customer\\Controller\\Adminhtml\\Index\\MassUnsubscribe', ['context' => $this->contextMock, 'filter' => $this->filterMock, 'collectionFactory' => $this->customerCollectionFactoryMock, 'customerRepository' => $this->customerRepositoryMock, 'subscriberFactory' => $subscriberFactoryMock]);
}
作者:pradeep-wagent
项目:magento
/**
* @param \Magento\Framework\App\Action\Context $context
* @param PhpCookieManager $cookieManager
* @param CookieMetadataFactory $cookieMetadataFactory
*/
public function __construct(\Magento\Framework\App\Action\Context $context, PhpCookieManager $cookieManager, CookieMetadataFactory $cookieMetadataFactory)
{
$this->cookieManager = $cookieManager;
$this->cookieMetadataFacory = $cookieMetadataFactory;
$this->_response = $context->getResponse();
$this->request = $context->getRequest();
}
作者:opexs
项目:magento
public function setUp()
{
$objectManagerHelper = new ObjectManagerHelper($this);
$this->context = $this->getMock('Magento\\Backend\\App\\Action\\Context', [], [], '', false);
$this->response = $this->getMock('Magento\\Framework\\App\\ResponseInterface', [], [], '', false);
$this->request = $this->getMock('Magento\\Framework\\App\\RequestInterface', [], [], '', false);
$this->objectManager = $this->getMock('Magento\\Framework\\ObjectManager\\ObjectManager', [], [], '', false);
$this->messageManager = $this->getMock('Magento\\Framework\\Message\\Manager', [], [], '', false);
$this->session = $this->getMock('Magento\\Backend\\Model\\Session', ['setIsUrlNotice'], [], '', false);
$this->actionFlag = $this->getMock('Magento\\Framework\\App\\ActionFlag', [], [], '', false);
$this->helper = $this->getMock('\\Magento\\Backend\\Helper\\Data', [], [], '', false);
$this->resultRedirect = $this->getMockBuilder('Magento\\Backend\\Model\\View\\Result\\Redirect')->disableOriginalConstructor()->getMock();
$this->resultRedirectFactory = $this->getMockBuilder('Magento\\Backend\\Model\\View\\Result\\RedirectFactory')->disableOriginalConstructor()->setMethods(['create'])->getMock();
$this->context->expects($this->once())->method('getMessageManager')->willReturn($this->messageManager);
$this->context->expects($this->once())->method('getObjectManager')->willReturn($this->objectManager);
$this->context->expects($this->once())->method('getSession')->willReturn($this->session);
$this->context->expects($this->once())->method('getActionFlag')->willReturn($this->actionFlag);
$this->context->expects($this->once())->method('getRequest')->willReturn($this->request);
$this->context->expects($this->once())->method('getResponse')->willReturn($this->response);
$this->context->expects($this->once())->method('getHelper')->willReturn($this->helper);
$this->context->expects($this->once())->method('getResultRedirectFactory')->willReturn($this->resultRedirectFactory);
$this->resultForward = $this->getMockBuilder('Magento\\Backend\\Model\\View\\Result\\Forward')->disableOriginalConstructor()->getMock();
$this->resultForwardFactory = $this->getMockBuilder('Magento\\Backend\\Model\\View\\Result\\ForwardFactory')->disableOriginalConstructor()->setMethods(['create'])->getMock();
$this->invoiceEmail = $objectManagerHelper->getObject('Magento\\Sales\\Controller\\Adminhtml\\Order\\Invoice\\Email', ['context' => $this->context, 'resultForwardFactory' => $this->resultForwardFactory]);
}
作者:kidaa3
项目:magento2-platforms
public function setUp()
{
$objectManagerHelper = new ObjectManagerHelper($this);
$this->shipmentLoader = $this->getMock('Magento\\Shipping\\Controller\\Adminhtml\\Order\\ShipmentLoader', ['setOrderId', 'setShipmentId', 'setShipment', 'setTracking', 'load'], [], '', false);
$this->context = $this->getMock('Magento\\Backend\\App\\Action\\Context', ['getRequest', 'getResponse', 'getMessageManager', 'getRedirect', 'getObjectManager', 'getSession', 'getActionFlag', 'getHelper', 'getResultFactory'], [], '', false);
$this->response = $this->getMock('Magento\\Framework\\App\\ResponseInterface', ['setRedirect', 'sendResponse'], [], '', false);
$this->request = $this->getMockBuilder('Magento\\Framework\\App\\RequestInterface')->setMethods(['isPost', 'getModuleName', 'setModuleName', 'getActionName', 'setActionName', 'getParam', 'getCookie'])->getMockForAbstractClass();
$this->objectManager = $this->getMock('Magento\\Framework\\ObjectManager\\ObjectManager', ['create'], [], '', false);
$this->messageManager = $this->getMock('Magento\\Framework\\Message\\Manager', ['addSuccess', 'addError'], [], '', false);
$this->session = $this->getMock('Magento\\Backend\\Model\\Session', ['setIsUrlNotice'], [], '', false);
$this->actionFlag = $this->getMock('Magento\\Framework\\App\\ActionFlag', ['get'], [], '', false);
$this->helper = $this->getMock('\\Magento\\Backend\\Helper\\Data', ['getUrl'], [], '', false);
$this->resultRedirect = $this->getMock('Magento\\Backend\\Model\\View\\Result\\Redirect', [], [], '', false);
$this->resultFactory = $this->getMock('Magento\\Framework\\Controller\\ResultFactory', ['create'], [], '', false);
$this->resultFactory->expects($this->once())->method('create')->with(\Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT)->willReturn($this->resultRedirect);
$this->context->expects($this->once())->method('getMessageManager')->willReturn($this->messageManager);
$this->context->expects($this->once())->method('getRequest')->willReturn($this->request);
$this->context->expects($this->once())->method('getResponse')->willReturn($this->response);
$this->context->expects($this->once())->method('getObjectManager')->willReturn($this->objectManager);
$this->context->expects($this->once())->method('getSession')->willReturn($this->session);
$this->context->expects($this->once())->method('getActionFlag')->willReturn($this->actionFlag);
$this->context->expects($this->once())->method('getHelper')->willReturn($this->helper);
$this->context->expects($this->once())->method('getResultFactory')->willReturn($this->resultFactory);
$this->shipmentEmail = $objectManagerHelper->getObject('Magento\\Shipping\\Controller\\Adminhtml\\Order\\Shipment\\Email', ['context' => $this->context, 'shipmentLoader' => $this->shipmentLoader, 'request' => $this->request, 'response' => $this->response]);
}
作者:whoopl
项目:magento2-testin
/**
* @param \Magento\Framework\App\Action\Context $context
*/
public function __construct(\Magento\Framework\App\Action\Context $context)
{
$this->_request = $context->getRequest();
$this->_response = $context->getResponse();
$this->resultRedirectFactory = $context->getResultRedirectFactory();
$this->resultFactory = $context->getResultFactory();
}
作者:Doabilit
项目:magento2de
/**
* @param Context $context
*/
public function __construct(Context $context)
{
$this->_request = $context->getRequest();
$this->_response = $context->getResponse();
$this->resultRedirectFactory = $context->getResultRedirectFactory();
$this->resultFactory = $context->getResultFactory();
}
作者:mirasvi
项目:module-blo
/**
* @param AuthorFactory $authorFactory
* @param Registry $registry
* @param Context $context
*/
public function __construct(AuthorFactory $authorFactory, Registry $registry, Context $context)
{
$this->authorFactory = $authorFactory;
$this->registry = $registry;
$this->resultFactory = $context->getResultFactory();
parent::__construct($context);
}
作者:Doabilit
项目:magento2de
/**
* @param Context $context
* @param Registry $coreRegistry
* @param DataFactory $dataFactory
* @param CartManagementInterface $cartManagement
* @param Onepage $onepageCheckout
* @param JsonHelper $jsonHelper
*/
public function __construct(Context $context, Registry $coreRegistry, DataFactory $dataFactory, CartManagementInterface $cartManagement, Onepage $onepageCheckout, JsonHelper $jsonHelper)
{
$this->eventManager = $context->getEventManager();
$this->cartManagement = $cartManagement;
$this->onepageCheckout = $onepageCheckout;
$this->jsonHelper = $jsonHelper;
parent::__construct($context, $coreRegistry, $dataFactory);
}
作者:nja7
项目:magento
protected function setUp()
{
$this->response = $this->getMock('Magento\\Framework\\App\\ResponseInterface', ['setRedirect', 'sendResponse']);
$this->redirect = $this->getMock('\\Magento\\Framework\\App\\Response\\RedirectInterface');
$this->context = $this->getMock('Magento\\Framework\\App\\Action\\Context', [], [], '', false);
$this->context->expects($this->any())->method('getResponse')->will($this->returnValue($this->response));
$this->context->expects($this->any())->method('getRedirect')->will($this->returnValue($this->redirect));
$this->unit = (new ObjectManager($this))->getObject('Magento\\Store\\Controller\\Store\\SwitchAction', ['context' => $this->context]);
}
作者:boxalin
项目:plugin-magento
/**
* AjaxPlugin constructor.
* @param Context $context
* @param \Boxalino\Intelligence\Helper\Data $bxHelperData
* @param \Boxalino\Intelligence\Helper\P13n\Adapter $p13nHelper
* @param AutocompleteInterface $autocomplete
* @param \Boxalino\Intelligence\Helper\Autocomplete $autocompleteHelper
*/
public function __construct(Context $context, \Boxalino\Intelligence\Helper\Data $bxHelperData, \Boxalino\Intelligence\Helper\P13n\Adapter $p13nHelper, \Boxalino\Intelligence\Helper\Autocomplete $autocompleteHelper)
{
$this->autocompleteHelper = $autocompleteHelper;
$this->url = $context->getUrl();
$this->request = $context->getRequest();
$this->p13nHelper = $p13nHelper;
$this->resultFactory = $context->getResultFactory();
$this->bxHelperData = $bxHelperData;
}
作者:whoopl
项目:magento2-testin
/**
* Run test for execute method (exception)
*
* @expectedException \Magento\Framework\Exception\LocalizedException
* @expectedExceptionMessage Wrong type of request.
*/
public function testExecuteException()
{
$this->contextMock = $this->getMockBuilder('Magento\\Framework\\App\\Action\\Context')->disableOriginalConstructor()->getMock();
$this->contextMock->expects(static::once())->method('getRequest')->willReturn($this->getRequestMock(false));
$this->checkoutSessionMock = $this->getMockBuilder('Magento\\Checkout\\Model\\Session')->disableOriginalConstructor()->getMock();
$this->checkoutSessionMock->expects(static::never())->method('getQuote');
$getButtonData = new GetButtonData($this->contextMock, $this->checkoutSessionMock);
$getButtonData->execute();
}
作者:alinmiro
项目:alin-cado
/**
* @param \Magento\Framework\App\Action\Context $context
* @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
* @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
*/
public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder, \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Escaper $escaper)
{
$this->_transportBuilder = $transportBuilder;
$this->inlineTranslation = $inlineTranslation;
$this->scopeConfig = $scopeConfig;
$this->storeManager = $storeManager;
$this->_escaper = $escaper;
$this->messageManager = $context->getMessageManager();
}
作者:SummaSolution
项目:cart-magento
/**
* @param PaymentHelper $paymentHelper
*/
public function __construct(\Magento\Framework\App\Action\Context $context, PaymentHelper $paymentHelper, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\View\Asset\Repository $assetRepo)
{
$this->_request = $context->getRequest();
$this->methodInstance = $paymentHelper->getMethodInstance($this->methodCode);
$this->_scopeConfig = $scopeConfig;
$this->_checkoutSession = $checkoutSession;
$this->_storeManager = $storeManager;
$this->_assetRepo = $assetRepo;
$this->_context = $context;
}
作者:opexs
项目:magento
public function setUp()
{
$this->request = $this->getMockBuilder('Magento\\Framework\\App\\RequestInterface')->disableOriginalConstructor()->getMock();
$this->response = $this->getMock('Magento\\Framework\\App\\ResponseInterface', [], [], '', false);
$this->redirect = $this->getMockBuilder('Magento\\Framework\\Controller\\Result\\Redirect')->setMethods(['setRefererOrBaseUrl'])->disableOriginalConstructor()->getMock();
$this->redirectFactory = $this->getMockBuilder('Magento\\Backend\\Model\\View\\Result\\RedirectFactory')->setMethods(['create'])->disableOriginalConstructor()->getMock();
$this->redirectFactory->expects($this->any())->method('create')->willReturn($this->redirect);
$this->context = $this->getMockBuilder('Magento\\Framework\\App\\Action\\Context')->disableOriginalConstructor()->getMock();
$this->context->expects($this->any())->method('getResultRedirectFactory')->willReturn($this->redirectFactory);
$this->action = $this->getMockForAbstractClass('Magento\\Framework\\App\\Action\\AbstractAction', [$this->context]);
}
作者:marcinN
项目:magento2-sample
protected function setUp()
{
$this->context = $this->getMockBuilder('Magento\\Framework\\App\\Action\\Context')->disableOriginalConstructor()->getMock();
$this->request = $this->getMockBuilder('Magento\\Framework\\App\\RequestInterface')->getMockForAbstractClass();
$this->context->expects($this->once())->method('getRequest')->willReturn($this->request);
$this->response = $this->getMockBuilder('Magento\\Framework\\App\\ResponseInterface')->getMockForAbstractClass();
$this->context->expects($this->once())->method('getResponse')->willReturn($this->response);
$this->resultPageFactory = $this->getMockBuilder('Magento\\Framework\\View\\Result\\PageFactory')->disableOriginalConstructor()->getMock();
$objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
$this->controller = $objectManager->getObject('\\Magento\\SampleServiceContractClient\\Controller\\Index\\Index', ['context' => $this->context, 'resultPageFactory' => $this->resultPageFactory]);
}
作者:shabbirvividad
项目:magento
/**
* @param Context $context
*/
public function __construct(Context $context)
{
parent::__construct($context->getRequest(), $context->getResponse());
$this->_objectManager = $context->getObjectManager();
$this->_eventManager = $context->getEventManager();
$this->_url = $context->getUrl();
$this->_actionFlag = $context->getActionFlag();
$this->_redirect = $context->getRedirect();
$this->_view = $context->getView();
$this->messageManager = $context->getMessageManager();
}
作者:Genmat
项目:M2_UnCancelOrde
public function afterGetButtonList(\Magento\Backend\Block\Widget\Context $subject, \Magento\Backend\Block\Widget\Button\ButtonList $buttonList)
{
$request = $this->_context->getRequest();
if ($request->getFullActionName() == 'sales_order_view') {
$order = $this->getOrder();
if ($order && $order->getState() == 'canceled') {
$message = __('Are you sure you want to un-cancel this order?');
$buttonList->add('order_uncancel', ['label' => __('Un-Cancel'), 'onclick' => "confirmSetLocation('{$message}', '" . $this->getUnCancelUrl() . "')"]);
}
}
return $buttonList;
}
作者:pavlot
项目:rejoine
public function __construct(\Magento\Framework\App\Action\Context $context, \Magento\Checkout\Model\CartFactory $cartModel, \Magento\Framework\ObjectManagerInterface $objectInterface, \Magento\Checkout\Model\Session $checkoutSession, \Rejoiner\Acr\Helper\Data $rejoinerHelper, \Magento\CatalogInventory\Model\ResourceModel\Stock\ItemFactory $stockItem, \Magento\CatalogInventory\Api\Data\StockItemInterfaceFactory $stockItemFactory, \Magento\Store\Model\StoreManagerInterface $storeManagerInterface, \Magento\Catalog\Model\ProductFactory $product)
{
$this->_checkoutSession = $checkoutSession;
$this->_objectInterface = $objectInterface;
$this->_rejoinerHelper = $rejoinerHelper;
$this->_stockItemFactory = $stockItemFactory;
$this->_cartModel = $cartModel;
$this->_stockItem = $stockItem;
$this->_storeManagerInterface = $storeManagerInterface;
$this->_product = $product;
$this->_messageManager = $context->getMessageManager();
parent::__construct($context);
}
作者:nblai
项目:magescotc
protected function setUp()
{
$this->requestMock = $this->getMockBuilder('Magento\\Framework\\App\\RequestInterface')->setMethods(['getPostValue'])->disableOriginalConstructor()->getMockForAbstractClass();
$this->viewMock = $this->getMockBuilder('Magento\\Framework\\App\\ViewInterface')->disableOriginalConstructor()->getMockForAbstractClass();
$this->coreRegistryMock = $this->getMockBuilder('Magento\\Framework\\Registry')->setMethods(['register'])->disableOriginalConstructor()->getMock();
$this->resultLayoutMock = $this->getMockBuilder('Magento\\Framework\\View\\Result\\Layout')->setMethods(['addDefaultHandle', 'getLayout', 'getUpdate', 'load'])->disableOriginalConstructor()->getMock();
$this->resultLayoutFactoryMock = $this->getMockBuilder('Magento\\Framework\\View\\Result\\LayoutFactory')->setMethods(['create'])->disableOriginalConstructor()->getMock();
$this->resultLayoutFactoryMock->expects($this->once())->method('create')->willReturn($this->resultLayoutMock);
$this->transactionMock = $this->getMockBuilder('Magento\\Paypal\\Model\\Payflow\\Service\\Response\\Transaction')->setMethods(['getResponseObject', 'validateResponse', 'savePaymentInQuote'])->disableOriginalConstructor()->getMock();
$this->contextMock = $this->getMockBuilder('\\Magento\\Framework\\App\\Action\\Context')->setMethods(['getRequest'])->disableOriginalConstructor()->getMock();
$this->contextMock->expects($this->once())->method('getRequest')->willReturn($this->requestMock);
$this->responseValidatorMock = $this->getMockBuilder('Magento\\Paypal\\Model\\Payflow\\Service\\Response\\Validator\\ResponseValidator')->disableOriginalConstructor()->getMock();
$this->object = new Response($this->contextMock, $this->coreRegistryMock, $this->transactionMock, $this->responseValidatorMock, $this->resultLayoutFactoryMock);
}