public function testAfterAfterSaveEmpty() { $this->productMock->expects($this->once())->method('getData')->with('media_gallery')->willReturn([]); $this->mediaBackendModel->expects($this->any())->method('getAttribute')->willReturn($this->attributeMock); $this->modelObject->afterAfterSave($this->mediaBackendModel, $this->productMock); }