From 774cb4c67ece33041901035602aa62c180ae76b1 Mon Sep 17 00:00:00 2001 From: Ricards Z Date: Tue, 28 Nov 2017 17:42:41 +0200 Subject: [PATCH] Remove unnecessary dependencies and fixed unit test case excessively long variable name --- app/code/Magento/Paypal/Test/Unit/Model/ExpressTest.php | 4 ++-- .../view/frontend/web/js/action/set-payment-method.js | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Paypal/Test/Unit/Model/ExpressTest.php b/app/code/Magento/Paypal/Test/Unit/Model/ExpressTest.php index 3d224262c99f1..1b8c33622e784 100644 --- a/app/code/Magento/Paypal/Test/Unit/Model/ExpressTest.php +++ b/app/code/Magento/Paypal/Test/Unit/Model/ExpressTest.php @@ -161,7 +161,7 @@ public function testAssignData() { $transportValue = 'something'; - $extensionAttributeMock = $this->getMockForAbstractClass( + $extensionAttribute = $this->getMockForAbstractClass( \Magento\Quote\Api\Data\PaymentExtensionInterface::class, [], '', @@ -175,7 +175,7 @@ public function testAssignData() Express\Checkout::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT => $transportValue, Express\Checkout::PAYMENT_INFO_TRANSPORT_PAYER_ID => $transportValue, Express\Checkout::PAYMENT_INFO_TRANSPORT_TOKEN => $transportValue, - \Magento\Framework\Api\ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY => $extensionAttributeMock + \Magento\Framework\Api\ExtensibleDataInterface::EXTENSION_ATTRIBUTES_KEY => $extensionAttribute ] ] ); diff --git a/app/code/Magento/Paypal/view/frontend/web/js/action/set-payment-method.js b/app/code/Magento/Paypal/view/frontend/web/js/action/set-payment-method.js index feb2538b0517e..63e34437c6f90 100644 --- a/app/code/Magento/Paypal/view/frontend/web/js/action/set-payment-method.js +++ b/app/code/Magento/Paypal/view/frontend/web/js/action/set-payment-method.js @@ -4,15 +4,9 @@ */ define([ - 'jquery', 'Magento_Checkout/js/model/quote', - 'Magento_Checkout/js/model/url-builder', - 'mage/storage', - 'Magento_Checkout/js/model/error-processor', - 'Magento_Customer/js/model/customer', - 'Magento_Checkout/js/model/full-screen-loader', 'Magento_Checkout/js/action/set-payment-information' -], function ($, quote, urlBuilder, storage, errorProcessor, customer, fullScreenLoader, setPaymentInformation) { +], function (quote, setPaymentInformation) { 'use strict'; return function (messageContainer) {