| 1 |
<?php |
| 2 |
|
| 3 |
namespace PostHog\Test; |
| 4 |
|
| 5 |
use PostHog\HttpResponse; |
| 6 |
use PostHog\Test\Assets\MockedResponses; |
| 7 |
|
| 8 |
class MockedHttpClient extends \PostHog\HttpClient |
| 9 |
{ |
| 10 |
public function sendRequest(string $path, ?string $payload, array $extraHeaders = []): HttpResponse |
| 11 |
{ |
| 12 |
if (!isset($this->calls)) { |
| 13 |
$this->calls = array(); |
| 14 |
} |
| 15 |
array_push($this->calls, array("path" => $path, "payload" => $payload)); |
| 16 |
|
| 17 |
return parent::sendRequest($path, $payload, $extraHeaders); |
| 18 |
} |
| 19 |
} |
| 20 |
|