Closed mahdiaslami closed 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey, and sorry for the late reply! I haven't really worked with Laravel's fakes in the past, so I understand the principle, but could you please explain a little more in detail how $fake = (new FirebaseFactory())->createMessaging()
is a fake? For me it looks as if this still creates the Messaging component from an uncounfigured Factory (and so would still make "real" requests to the Firebase APIs... 🤔
I Searched in kreait\firebase-php package i found it use
Kreait\Firebase\Factory
inIntegerationTestCase
class and used it to test. (For example testsubscriteToTopic
method inFirebaseMessaging
class).Is it possible to adding
fake
method toFirebaseMessaging
facade and other facades for mocking and used it in test likeMailFake
class in laravel.Example change in
FirebaseMessaging
facade:Example test for an API:
I test and it work prefect. Is it good way for creating test??