From 3fc5b5717042a0ca2e87e78958904265528e8ef6 Mon Sep 17 00:00:00 2001
From: Stanislav Idolov <sidolov@ebay.com>
Date: Tue, 27 Oct 2015 10:16:40 +0200
Subject: [PATCH] MAGETWO-44589: [Github] Make API jsonapi compliant

---
 .../Magento/Backend/Test/Unit/Model/Session/QuoteTest.php | 1 +
 .../Test/Unit/Model/Cart/CartTotalManagementTest.php      | 2 +-
 .../Test/Unit/Model/GuestCart/GuestCartManagementTest.php | 8 +-------
 .../Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php   | 4 +---
 .../Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php | 2 +-
 5 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php b/app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php
index c0990730275..b1888ef8fd6 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php
@@ -8,6 +8,7 @@ namespace Magento\Backend\Test\Unit\Model\Session;
 /**
  * Class QuoteTest
  * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ * @SuppressWarnings(PHPMD.TooManyFields)
  */
 class QuoteTest extends \PHPUnit_Framework_TestCase
 {
diff --git a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php
index 54652f8c811..90aaa4ccaaf 100644
--- a/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php
+++ b/app/code/Magento/Quote/Test/Unit/Model/Cart/CartTotalManagementTest.php
@@ -43,7 +43,7 @@ class CartTotalManagementTest extends \PHPUnit_Framework_TestCase
         $this->paymentMock = $this->getMock('\Magento\Quote\Api\PaymentMethodManagementInterface', [], [], '', false);
         $this->cartTotalMock = $this->getMock('\Magento\Quote\Api\CartTotalRepositoryInterface', [], [], '', false);
         $this->model = $this->objectManager->getObject(
-            '\Magento\Quote\Api\CartTotalManagementInterface',
+            '\Magento\Quote\Model\Cart\CartTotalManagement',
             [
                 'shippingMethodManagement' => $this->shippingMock,
                 'paymentMethodManagement' => $this->paymentMock,
diff --git a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php
index 63d84bec059..bab6ee59683 100644
--- a/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php
+++ b/app/code/Magento/Quote/Test/Unit/Model/GuestCart/GuestCartManagementTest.php
@@ -72,13 +72,7 @@ class GuestCartManagementTest extends \PHPUnit_Framework_TestCase
             false
         );
 
-        $this->cartRepositoryMock = $this->getMock(
-            'Magento\Quote\Api\CartRepositoryInterface',
-            ['get', 'getList'],
-            [],
-            '',
-            false
-        );
+        $this->cartRepositoryMock = $this->getMock('Magento\Quote\Api\CartRepositoryInterface');
 
         $this->quoteMock = $this->getMockForAbstractClass(
             'Magento\Quote\Api\Data\CartInterface',
diff --git a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php
index 11dd10b134a..3a957b4936b 100644
--- a/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php
+++ b/app/code/Magento/Quote/Test/Unit/Model/Quote/Item/RepositoryTest.php
@@ -7,8 +7,6 @@
 
 namespace Magento\Quote\Test\Unit\Model\Quote\Item;
 
-use Magento\Quote\Api\CartItemRepositoryInterface;
-
 class RepositoryTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -384,7 +382,7 @@ class RepositoryTest extends \PHPUnit_Framework_TestCase
         $itemId = 5;
         $buyRequest = $this->getMock('Magento\Framework\DataObject', [], [], '', false);
         $cartItemProcessorMock = $this->getMock('\Magento\Quote\Model\Quote\Item\CartItemProcessorInterface');
-        $this->repository = new Repository(
+        $this->repository = new \Magento\Quote\Model\Quote\Item\Repository(
             $this->quoteRepositoryMock,
             $this->productRepositoryMock,
             $this->itemDataFactoryMock,
diff --git a/app/code/Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php b/app/code/Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php
index a6a2a8fe628..4b4cd113eb7 100644
--- a/app/code/Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php
+++ b/app/code/Magento/Quote/Test/Unit/Model/QuoteRepositoryTest.php
@@ -98,7 +98,7 @@ class QuoteRepositoryTest extends \PHPUnit_Framework_TestCase
         );
 
         $this->model = $objectManager->getObject(
-            'Magento\Quote\Api\CartRepositoryInterface',
+            'Magento\Quote\Model\QuoteRepository',
             [
                 'quoteFactory' => $this->quoteFactoryMock,
                 'storeManager' => $this->storeManagerMock,
-- 
GitLab