Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function test_newchatmember_success() |
||
20 | { |
||
21 | $data = [ |
||
22 | 'message' => [ |
||
23 | 'chat' => [ |
||
24 | 'id' => 133433434, |
||
25 | ], |
||
26 | 'new_chat_member' => [ |
||
27 | 'id' => 12345678, |
||
28 | 'first_name' => 'AlexR1712', |
||
29 | ], |
||
30 | ], |
||
31 | ]; |
||
32 | |||
33 | $body = json_encode($data); |
||
34 | $r = $this->client->request('POST', 'webhook.php', ['body' => $body]); |
||
35 | echo $r->getBody(); |
||
36 | file_put_contents('test', $r->getBody()); |
||
37 | $this->assertEquals(200, $r->getStatusCode()); |
||
38 | } |
||
39 | } |
||
40 |