/** * @dataProvider dataForVideoPlay */ public function testGetPlayIfBaseAttribute($expectedResult) { $this->viewConfigMock->expects($this->once())->method('getMediaAttributes')->willReturn($expectedResult); $this->mediaHelperObject->getPlayIfBaseAttribute(); }
/** * 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); }
/** * Test for method getPlayIfBaseAttribute */ public function testGetPlayIfBaseAttribute() { $return = 'some_value'; $this->scopeConfigMock->expects($this->once())->method('getValue')->with(Media::XML_PATH_PLAY_IF_BASE)->will($this->returnValue($return)); $this->assertEquals($return, $this->helper->getPlayIfBaseAttribute()); }