コード例 #1
0
 /**
  * @dataProvider dataForVideoStop
  */
 public function testGetShowRelatedAttribute($expectedResult)
 {
     $this->viewConfigMock->expects($this->once())->method('getMediaAttributes')->willReturn($expectedResult);
     $this->mediaHelperObject->getShowRelatedAttribute();
 }
コード例 #2
0
 /**
  * Retrieve video settings data in JSON format
  *
  * @return string
  */
 public function getVideoSettingsJson()
 {
     $videoSettingData[] = ['playIfBase' => $this->mediaHelper->getPlayIfBaseAttribute(), 'showRelated' => $this->mediaHelper->getShowRelatedAttribute(), 'videoAutoRestart' => $this->mediaHelper->getVideoAutoRestartAttribute()];
     return $this->jsonEncoder->encode($videoSettingData);
 }
コード例 #3
0
 /**
  * Test for method getShowRelatedAttribute
  */
 public function testGetShowRelatedAttribute()
 {
     $return = 'some_value';
     $this->scopeConfigMock->expects($this->once())->method('getValue')->with(Media::XML_PATH_SHOW_RELATED)->will($this->returnValue($return));
     $this->assertEquals($return, $this->helper->getShowRelatedAttribute());
 }