Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
17 | public function thePayloadReceivedByWebhookShouldBeEqualTo(string $url, PyStringNode $body): void |
||
18 | { |
||
19 | $client = new Client(); |
||
20 | $response = $client->request('GET', $url); |
||
21 | $expected = str_replace('\\"', '"', $body); |
||
22 | $actual = $response->getBody()->getContents(); |
||
23 | |||
24 | $expected = $this->convertToJson($expected); |
||
25 | $actual = $this->convertToJson($actual); |
||
26 | |||
27 | if ($expected !== $actual) { |
||
28 | throw new \Exception("The body $actual is not equal to $expected"); |
||
29 | } |
||
30 | } |
||
31 | |||
43 |