Skip to content

Commit 843a95f

Browse files
committed
MAGETWO-90327: Dedicated debug logging files for Payment and Shipping activity
1 parent 2dc7c29 commit 843a95f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

app/code/Magento/Ups/Test/Unit/Model/CarrierCollectRatesOptionsTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
use Magento\Framework\Locale\FormatInterface;
3333
use Magento\Ups\Helper\Config;
3434
use Magento\Quote\Model\Quote\Address\RateRequest;
35+
use Magento\Framework\HTTP\ClientFactory;
36+
use Magento\Framework\HTTP\ClientInterface;
3537

3638
/**
3739
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
@@ -64,6 +66,11 @@ class CarrierCollectRatesOptionsTest extends \PHPUnit\Framework\TestCase
6466
*/
6567
private $include_taxes;
6668

69+
/**
70+
* @var ClientInterface|MockObject
71+
*/
72+
private $httpClient;
73+
6774
/**
6875
* set up test environment
6976
*
@@ -115,6 +122,14 @@ protected function setUp()
115122
->method('create')
116123
->willReturn($rateResultMock);
117124

125+
$httpClientFactory = $this->getMockBuilder(ClientFactory::class)
126+
->disableOriginalConstructor()
127+
->setMethods(['create'])
128+
->getMock();
129+
$this->httpClient = $this->getMockForAbstractClass(ClientInterface::class);
130+
$httpClientFactory->method('create')
131+
->willReturn($this->httpClient);
132+
118133
$priceInterfaceMock = $this->getMockBuilder(PriceCurrencyInterface::class)
119134
->disableOriginalConstructor()
120135
->getMock();
@@ -229,6 +244,7 @@ protected function setUp()
229244
'stockRegistry' => $stockRegistryMock,
230245
'localeFormat' => $formatInterfaceMock,
231246
'configHelper' => $configHelperMock,
247+
'httpClientFactory' => $httpClientFactory,
232248
'data' => [],
233249
]
234250
)

0 commit comments

Comments
 (0)