Skip to content

Commit 77ecd9a

Browse files
committed
MAGETWO-90496: Countries from default website set when edit order address
- Updated unit test
1 parent 075cc87 commit 77ecd9a

File tree

1 file changed

+11
-0
lines changed
  • app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create

1 file changed

+11
-0
lines changed

app/code/Magento/Sales/Test/Unit/Block/Adminhtml/Order/Create/FormTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use Magento\Sales\Block\Adminhtml\Order\Create\Form;
2424
use Magento\Sales\Model\AdminOrder\Create;
2525
use Magento\Store\Model\Store;
26+
use Magento\Store\Model\StoreManagerInterface;
2627
use PHPUnit\Framework\TestCase;
2728
use PHPUnit_Framework_MockObject_MockObject as MockObject;
2829

@@ -51,6 +52,11 @@ class FormTest extends TestCase
5152
*/
5253
private $block;
5354

55+
/**
56+
* @var StoreManagerInterface|MockObject
57+
*/
58+
private $storeManager;
59+
5460
/**
5561
* @inheritdoc
5662
*/
@@ -60,6 +66,9 @@ protected function setUp()
6066
$context = $this->getMockBuilder(Context::class)
6167
->disableOriginalConstructor()
6268
->getMock();
69+
$this->storeManager = $this->getMockForAbstractClass(StoreManagerInterface::class);
70+
$context->method('getStoreManager')
71+
->willReturn($this->storeManager);
6372
$this->quoteSession = $this->getMockBuilder(QuoteSession::class)
6473
->disableOriginalConstructor()
6574
->setMethods(['getCustomerId', 'getQuoteId', 'getStoreId', 'getStore', 'getQuote'])
@@ -119,6 +128,8 @@ public function testGetOrderDataJson()
119128
'quote_id' => $quoteId
120129
];
121130

131+
$this->storeManager->method('setCurrentStore')
132+
->with($storeId);
122133
$this->quoteSession->method('getCustomerId')
123134
->willReturn($customerId);
124135
$this->quoteSession->method('getStoreId')

0 commit comments

Comments
 (0)