Skip to content

Commit

Permalink
Make it possible to add a payload to the receives method (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Rumpel authored and mpociot committed Oct 29, 2017
1 parent c97c1be commit c0e2152
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Testing/BotManTester.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@ public function receivesRaw($message)

/**
* @param string $message
* @param null $payload
* @return $this
*/
public function receives($message)
public function receives($message, $payload = null)
{
return $this->receivesRaw(new IncomingMessage($message, $this->user_id, $this->channel));
return $this->receivesRaw(new IncomingMessage($message, $this->user_id, $this->channel, $payload));
}

/**
Expand Down

0 comments on commit c0e2152

Please sign in to comment.