RecordingProviderClient.php 498 B

123456789101112131415
  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 function __construct(private array $config = []) {}
  8. public function post(string $url, array $options): \GuzzleHttp\Psr7\Response
  9. {
  10. self::$requests[] = ['url' => $url, 'options' => $options] + $this->config;
  11. return new \GuzzleHttp\Psr7\Response(200, [], '{}');
  12. }
  13. }