Skip to content
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

Changed method names #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public function testStartConversation()

### Skip Assertion

In cases when your bot replies with several messages you can assert only a specific reply using the `reply` method to skip assertion. All tests below will pass.
In cases when your bot replies with several messages you can assert only a specific reply using the `skipReply` method to skip assertion. All tests below will pass.

```php
public function testStartConversation()
Expand All @@ -338,7 +338,7 @@ public function testStartConversation()
{
$this->bot
->receives('Tell me something')
->reply()
->skipReply()
->assertReply('Ok')
->assertQuestion('Here are some topics we could discuss');
}
Expand All @@ -347,14 +347,14 @@ public function testStartConversation()
{
$this->bot
->receives('Tell me something')
->reply(2)
->skipReply(2)
->assertQuestion('Here are some topics we could discuss');
}
```

### ReceiveRaw and AssertRaw

If none of the helper methods can handle your specific test case you can use the `receiveRaw` and `assertRaw` methods.
If none of the helper methods can handle your specific test case you can use the `receivesIncomingMessage` and `assertOutgoingMessage` methods.

```php
public function testStartConversation()
Expand All @@ -363,8 +363,8 @@ public function testStartConversation()
$outgoing = new OutgoingMessage('Hello');

$this->bot
->receivesRaw($incoming)
->assertRaw($outgoing);
->receivesIncomingMessage($incoming)
->assertOutgoingMessage($outgoing);
}
```