Skip to content

Commit eaa4b06

Browse files
committed
MC-37807: Link to a file of a Product with Customizable Option(File) is not available throughout a multishipping checkout process
1 parent eddd50a commit eaa4b06

File tree

1 file changed

+11
-8
lines changed
  • dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout

1 file changed

+11
-8
lines changed

dev/tests/integration/testsuite/Magento/Multishipping/Block/Checkout/OverviewTest.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Magento\Multishipping\Block\Checkout;
88

9-
use Magento\Catalog\Model\Product;
9+
use Magento\Catalog\Model\ProductRepository;
1010
use Magento\Checkout\Block\Cart\Item\Renderer;
1111
use Magento\Framework\App\Area;
1212
use Magento\Framework\ObjectManagerInterface;
@@ -26,20 +26,20 @@ class OverviewTest extends TestCase
2626
/**
2727
* @var Overview
2828
*/
29-
protected $block;
29+
private $block;
3030

3131
/**
3232
* @var ObjectManagerInterface
3333
*/
34-
protected $objectManager;
34+
private $objectManager;
3535

3636
/**
3737
* @var Quote
3838
*/
3939
private $quote;
4040

4141
/**
42-
* @var Product
42+
* @var ProductRepository
4343
*/
4444
private $product;
4545

@@ -48,6 +48,9 @@ class OverviewTest extends TestCase
4848
*/
4949
private $item;
5050

51+
/**
52+
* @inheritdoc
53+
*/
5154
protected function setUp(): void
5255
{
5356
Bootstrap::getInstance()->loadArea(Area::AREA_FRONTEND);
@@ -72,17 +75,17 @@ protected function setUp(): void
7275
Renderer::class,
7376
['template' => 'cart/item/default.phtml']
7477
);
75-
$this->quote = $this->objectManager->get(Quote::class);
76-
$this->product = $this->objectManager->get(Product::class);
77-
$this->item = $this->objectManager->get(Item::class);
78+
$this->quote = $this->objectManager->create(Quote::class);
79+
$this->product = $this->objectManager->create(ProductRepository::class);
80+
$this->item = $this->objectManager->create(Item::class);
7881
}
7982

8083
/**
8184
* @magentoDataFixture Magento/Catalog/_files/product_simple.php
8285
*/
8386
public function testGetRowItemHtml()
8487
{
85-
$product = $this->product->load('1');
88+
$product = $this->product->get('simple');
8689
$item = $this->item->setProduct($product);
8790
$item->setQuote($this->quote);
8891
// assure that default renderer was obtained

0 commit comments

Comments
 (0)