MihaelIsaev / FCM

⚡️ PushNotifications through FireBase for Vapor 3 and 4.
MIT License
125 stars 36 forks source link

add sendMessage to the FCMProvider protocol so it can be mocked in tests #13

Closed FredericRuaudel closed 4 years ago

FredericRuaudel commented 4 years ago

Hello !

This PR declare the sendMessage in the FCMProvider protocol so we can mock it by using the config.prefer mechanism of Vapor 3 like this:

services.register(FCMMock.self)
config.prefer(FCMMock.self, for: FCMProvider.self)
m-maillot commented 4 years ago

I vote for this PR :)

FredericRuaudel commented 4 years ago

Thanks for the quick merge! 🙏

MihaelIsaev commented 4 years ago

@FredericRuaudel you're welcome! Thanks for the useful pull request! 🚀