-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathExampleTest.php
More file actions
50 lines (45 loc) · 1.71 KB
/
ExampleTest.php
File metadata and controls
50 lines (45 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
namespace Tests\BotMan;
use Tests\TestCase;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$this->bot
->receives('Hi')
->assertReply('Hello!');
}
/**
* A conversation test example.
*
* @return void
*/
public function testConversationBasicTest()
{
$quotes = [
'When there is no desire, all things are at peace. - Laozi',
'Simplicity is the ultimate sophistication. - Leonardo da Vinci',
'Simplicity is the essence of happiness. - Cedric Bledsoe',
'Smile, breathe, and go slowly. - Thich Nhat Hanh',
'Simplicity is an acquired taste. - Katharine Gerould',
'Well begun is half done. - Aristotle',
'He who is contented is rich. - Laozi',
'Very little is needed to make a happy life. - Marcus Antoninus',
'It is quality rather than quantity that matters. - Lucius Annaeus Seneca',
'Genius is one percent inspiration and ninety-nine percent perspiration. - Thomas Edison',
'Computer science is no more about computers than astronomy is about telescopes. - Edsger Dijkstra',
'It always seems impossible until it is done. - Nelson Mandela',
'Act only according to that maxim whereby you can, at the same time, will that it should become a universal law. - Immanuel Kant',
];
$this->bot
->receives('Start Conversation')
->assertQuestion('Huh - you woke me up. What do you need?')
->receivesInteractiveMessage('quote')
->assertReplyIn($quotes);
}
}