use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
class GenericRetryStrategyTest extends TestCase
{ /**
* @dataProvider provideRetryable
*/
public function testShouldRetry(string
$method, int
$code, ?TransportExceptionInterface
$exception) { $strategy =
new GenericRetryStrategy();
self::
assertTrue($strategy->
shouldRetry($this->
getContext(0,
$method, 'http://example.com/',
$code), null,
$exception));
} /**
* @dataProvider provideNotRetryable
*/
public function testShouldNotRetry(string
$method, int
$code, ?TransportExceptionInterface
$exception) { $strategy =
new GenericRetryStrategy();
self::
assertFalse($strategy->
shouldRetry($this->
getContext(0,
$method, 'http://example.com/',
$code), null,
$exception));
}