Skip to content

Commit 25eb81c

Browse files
committed
Updated the jsonSerializer position in unit test
1 parent c63286e commit 25eb81c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

app/code/Magento/Catalog/Test/Unit/ViewModel/Product/BreadcrumbsTest.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\Catalog\ViewModel\Product\Breadcrumbs;
1313
use Magento\Framework\App\Config\ScopeConfigInterface;
1414
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
15+
use Magento\Framework\Serialize\Serializer\JsonHexTag;
1516

1617
/**
1718
* Unit test for Magento\Catalog\ViewModel\Product\Breadcrumbs.
@@ -38,6 +39,11 @@ class BreadcrumbsTest extends \PHPUnit\Framework\TestCase
3839
*/
3940
private $objectManager;
4041

42+
/**
43+
* @var JsonHexTag|\PHPUnit_Framework_MockObject_MockObject
44+
*/
45+
private $serializer;
46+
4147
/**
4248
* @inheritdoc
4349
*/
@@ -54,15 +60,16 @@ protected function setUp() : void
5460
->getMockForAbstractClass();
5561

5662
$escaper = $this->getObjectManager()->getObject(\Magento\Framework\Escaper::class);
57-
$this->serializer = $this->createMock(\Magento\Framework\Serialize\Serializer\JsonHexTag::class);
63+
64+
$this->serializer = $this->createMock(JsonHexTag::class);
5865

5966
$this->viewModel = $this->getObjectManager()->getObject(
6067
Breadcrumbs::class,
6168
[
6269
'catalogData' => $this->catalogHelper,
6370
'scopeConfig' => $this->scopeConfig,
64-
'jsonSerializer' => $this->serializer,
65-
'escaper' => $escaper
71+
'escaper' => $escaper,
72+
'jsonSerializer' => $this->serializer
6673
]
6774
);
6875
}

0 commit comments

Comments
 (0)