/** * Test getMediaEmptyGalleryDataJson() */ public function testGetMediaEmptyGalleryDataJson() { $mediaGalleryData = []; $this->coreRegistry->expects($this->any())->method('registry')->willReturn($this->productModelMock); $typeInstance = $this->getMock('\\Magento\\Catalog\\Model\\Product\\Type\\AbstractType', [], [], '', false); $typeInstance->expects($this->any())->method('getStoreFilter')->willReturn('_cache_instance_store_filter'); $this->productModelMock->expects($this->any())->method('getTypeInstance')->willReturn($typeInstance); $this->productModelMock->expects($this->any())->method('getMediaGalleryImages')->willReturn($mediaGalleryData); $this->gallery->getMediaGalleryDataJson(); }