File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
app/code/Magento/Customer Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ class CustomerScopeData extends \Magento\Framework\View\Element\Template
2525 private $ serializer ;
2626
2727 /**
28- * CustomerScopeData constructor.
2928 * @param \Magento\Framework\View\Element\Template\Context $context
3029 * @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
3130 * @param array $data
3231 * @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
3332 * @throws \RuntimeException
33+ * @SuppressWarnings(PHPMD.UnusedFormalParameter)
3434 */
3535 public function __construct (
3636 \Magento \Framework \View \Element \Template \Context $ context ,
Original file line number Diff line number Diff line change 1010use Magento \Store \Api \Data \StoreInterface ;
1111use Magento \Store \Model \StoreManagerInterface ;
1212use Magento \Customer \Block \CustomerScopeData ;
13- use Magento \Framework \Json \EncoderInterface ;
1413
1514class CustomerScopeDataTest extends \PHPUnit_Framework_TestCase
1615{
@@ -26,6 +25,9 @@ class CustomerScopeDataTest extends \PHPUnit_Framework_TestCase
2625 /** @var ScopeConfigInterface|\PHPUnit_Framework_MockObject_MockObject */
2726 private $ scopeConfigMock ;
2827
28+ /** @var \Magento\Framework\Json\EncoderInterface|\PHPUnit_Framework_MockObject_MockObject */
29+ private $ encoderMock ;
30+
2931 /** @var \Magento\Framework\Serialize\Serializer\Json|\PHPUnit_Framework_MockObject_MockObject */
3032 private $ serializerMock ;
3133
@@ -41,6 +43,9 @@ protected function setUp()
4143 $ this ->scopeConfigMock = $ this ->getMockBuilder (ScopeConfigInterface::class)
4244 ->getMock ();
4345
46+ $ this ->encoderMock = $ this ->getMockBuilder (\Magento \Framework \Json \EncoderInterface::class)
47+ ->getMock ();
48+
4449 $ this ->serializerMock = $ this ->getMockBuilder (\Magento \Framework \Serialize \Serializer \Json::class)
4550 ->getMock ();
4651
@@ -54,7 +59,7 @@ protected function setUp()
5459
5560 $ this ->model = new CustomerScopeData (
5661 $ this ->contextMock ,
57- null ,
62+ $ this -> encoderMock ,
5863 [],
5964 $ this ->serializerMock
6065 );
You can’t perform that action at this time.
0 commit comments