Skip to content

Commit c0e2152

Browse files
Christoph Rumpelmpociot
Christoph Rumpel
authored andcommitted
Make it possible to add a payload to the receives method (#17)
1 parent c97c1be commit c0e2152

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Testing/BotManTester.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,12 @@ public function receivesRaw($message)
110110

111111
/**
112112
* @param string $message
113+
* @param null $payload
113114
* @return $this
114115
*/
115-
public function receives($message)
116+
public function receives($message, $payload = null)
116117
{
117-
return $this->receivesRaw(new IncomingMessage($message, $this->user_id, $this->channel));
118+
return $this->receivesRaw(new IncomingMessage($message, $this->user_id, $this->channel, $payload));
118119
}
119120

120121
/**

0 commit comments

Comments
 (0)