Skip to content

Latest commit

 

History

History
95 lines (36 loc) · 1.49 KB

LaravelFCM-Test-Mocks-MockTopicResponse.md

File metadata and controls

95 lines (36 loc) · 1.49 KB

LaravelFCM\Test\Mocks\MockTopicResponse

Class MockTopicResponse Only use it for testing

Methods

setSuccess

mixed LaravelFCM\Test\Mocks\MockTopicResponse::setSuccess($messageId)

if success set a message id

  • Visibility: public

Arguments

  • $messageId mixed

isSuccess

boolean LaravelFCM\Response\TopicResponseContract::isSuccess()

true if topic sent with success

setError

mixed LaravelFCM\Test\Mocks\MockTopicResponse::setError($error)

set error

  • Visibility: public

Arguments

  • $error mixed

error

string LaravelFCM\Response\TopicResponseContract::error()

return error message you should test if it's necessary to resent it

shouldRetry

boolean LaravelFCM\Response\TopicResponseContract::shouldRetry()

return true if it's necessary resent it using exponential backoff