Class MockDownstreamResponse Only use it for testing
- Class name: MockDownstreamResponse
- Namespace: LaravelFCM\Test\Mocks
- This class implements: LaravelFCM\Response\DownstreamResponseContract
mixed LaravelFCM\Test\Mocks\MockDownstreamResponse::__construct($numberSuccess)
DownstreamResponse constructor.
- Visibility: public
- $numberSuccess mixed
mixed LaravelFCM\Response\DownstreamResponseContract::merge(\LaravelFCM\Response\DownstreamResponse $response)
Merge two response
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract
- $response LaravelFCM\Response\DownstreamResponse
integer LaravelFCM\Response\DownstreamResponseContract::numberSuccess()
Get the number of device reached with success
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract
integer LaravelFCM\Response\DownstreamResponseContract::numberFailure()
Get the number of device which thrown an error
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract
integer LaravelFCM\Response\DownstreamResponseContract::numberModification()
Get the number of device that you need to modify their token
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract
mixed LaravelFCM\Test\Mocks\MockDownstreamResponse::addTokenToDelete($token)
Add a token to delete
- Visibility: public
- $token mixed
array LaravelFCM\Response\DownstreamResponseContract::tokensToDelete()
get token to delete
remove all tokens returned by this method in your database
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract
mixed LaravelFCM\Test\Mocks\MockDownstreamResponse::addTokenToModify($oldToken, $newToken)
Add a token to modify
- Visibility: public
- $oldToken mixed
- $newToken mixed
array LaravelFCM\Response\DownstreamResponseContract::tokensToModify()
get token to modify
key: oldToken value: new token
find the old token in your database and replace it with the new one
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract
mixed LaravelFCM\Test\Mocks\MockDownstreamResponse::addTokenToRetry($token)
Add a token to retry
- Visibility: public
- $token mixed
array LaravelFCM\Response\DownstreamResponseContract::tokensToRetry()
Get tokens that you should resend using exponential backoof
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract
mixed LaravelFCM\Test\Mocks\MockDownstreamResponse::addTokenWithError($token, $message)
Add a token to errors
- Visibility: public
- $token mixed
- $message mixed
array LaravelFCM\Response\DownstreamResponseContract::tokensWithError()
Get tokens that thrown an error
key : token value : error
In production, remove these tokens from you database
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract
mixed LaravelFCM\Test\Mocks\MockDownstreamResponse::setMissingToken($hasMissingToken)
change missing token state
- Visibility: public
- $hasMissingToken mixed
boolean LaravelFCM\Response\DownstreamResponseContract::hasMissingToken()
check if missing tokens was given to the request If true, remove all the empty token in your database
- Visibility: public
- This method is defined by LaravelFCM\Response\DownstreamResponseContract