コード例 #1
0
 public function testGetGiftOptionsConfigJson()
 {
     $this->compositeConfigProvider->expects($this->once())->method('getConfig')->willReturn($this->jsLayout);
     $this->jsonEncoderMock->expects($this->once())->method('encode')->with($this->jsLayout)->willReturnArgument(0);
     $this->assertEquals($this->jsLayout, $this->model->getGiftOptionsConfigJson());
 }
コード例 #2
0
 public function testGetConfig()
 {
     $configMock = ['configuration' => ['option_1' => 'enabled']];
     $this->configProviderMock->expects($this->once())->method('getConfig')->willReturn($configMock);
     $this->assertSame($configMock, $this->model->getConfig());
 }