32 $this->context = $this->createMock(\
Magento\Backend\Block\Template\Context::class);
33 $this->jsonEncoderMock = $this->createMock(\
Magento\Framework\Json\Encoder::class);
34 $this->compositeConfigProvider = $this->createMock(\
Magento\GiftMessage\Model\CompositeConfigProvider::class);
35 $this->layoutProcessorMock = $this->getMockForAbstractClass(
36 \
Magento\Checkout\Block\Checkout\LayoutProcessorInterface::class,
43 $this->jsonEncoderMock,
44 $this->compositeConfigProvider,
45 [$this->layoutProcessorMock],
46 [
'jsLayout' => $this->jsLayout]
52 $this->layoutProcessorMock->expects($this->once())
54 ->with($this->jsLayout)
55 ->willReturnArgument(0);
56 $this->jsonEncoderMock->expects($this->once())
58 ->with($this->jsLayout)
59 ->willReturnArgument(0);
60 $this->assertEquals($this->jsLayout, $this->model->getJsLayout());
65 $this->compositeConfigProvider->expects($this->once())
67 ->willReturn($this->jsLayout);
68 $this->jsonEncoderMock->expects($this->once())
70 ->with($this->jsLayout)
71 ->willReturnArgument(0);
72 $this->assertEquals($this->jsLayout, $this->model->getGiftOptionsConfigJson());
testGetGiftOptionsConfigJson()