-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to simulate getMessage() response in tests? #1218
Labels
Comments
I found only one way to simulate these values by using raw objects: /**
* IncomingMessage constructor
*
* @param string $message
* @param string $sender
* @param string $recipient
* @param array $payload
*/
$incoming = new IncomingMessage('hello', '123', '321', [
'chat' => [
'type' => 'private',
]
]);
$this->bot
->receivesRaw($incoming); As a temporary solution, it works, but I hope Botman will get it improved later. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
There is a test helper
setUser()
, but there is no analog forsetMessage()
. I'm using the following data from messages in my code and need to simulate them in tests:I'm using the Telegram driver.
The text was updated successfully, but these errors were encountered: