public function testAfterLoadNoVideo() { $mediaData = ['images' => [['value_id' => '7', 'file' => '/h/d/hd_image.jpg', 'media_type' => 'image', 'entity_id' => '1', 'label' => '', 'position' => '4', 'disabled' => '0', 'label_default' => null, 'position_default' => '4', 'disabled_default' => '0']], 'values' => []]; $resourceEntryResult = []; $this->productMock->expects($this->once())->method('getData')->with('media_gallery')->willReturn($mediaData); $this->resourceEntryMediaGalleryMock->expects($this->once())->method('loadDataFromTableByValueId')->willReturn($resourceEntryResult); $this->mediaBackendModel->expects($this->any())->method('getAttribute')->willReturn($this->attributeMock); $this->modelObject->afterAfterLoad($this->mediaBackendModel, $this->productMock); }