public function testGetImages() { $mediaGallery = ['images' => [['value_id' => '1', 'file' => 'image_1.jpg', 'media_type' => 'image'], ['value_id' => '2', 'file' => 'image_2.jpg', 'media_type' => 'image']]]; $this->registryMock->expects($this->once())->method('registry')->willReturn($this->productMock); $this->productMock->expects($this->once())->method('getData')->willReturn($mediaGallery); $this->assertSame($mediaGallery, $this->gallery->getImages()); }