RecordingProviderClient.php 560 B

12345678910111213141516
  1. <?php
  2. namespace Tests\Support;
  3. /** Test transport only; provider request building and signing still execute normally. */
  4. class RecordingProviderClient
  5. {
  6. public static array $requests = [];
  7. public static string $responseBody = '{}';
  8. public function __construct(private array $config = []) {}
  9. public function post(string $url, array $options): \GuzzleHttp\Psr7\Response
  10. {
  11. self::$requests[] = ['url' => $url, 'options' => $options] + $this->config;
  12. return new \GuzzleHttp\Psr7\Response(200, [], self::$responseBody);
  13. }
  14. }