Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 8e6f135

Browse files
committed
Make retryAfter protected on BaseResponse and improve the test for ServerResponseException
1 parent 904cc1c commit 8e6f135

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Response/BaseResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class BaseResponse
3333
* @see https://httpwg.org/specs/rfc7231.html#header.retry-after
3434
* @var int|string|null
3535
*/
36-
public $retryAfter;
36+
protected $retryAfter;
3737

3838
/**
3939
* BaseResponse constructor.

tests/DownstreamResponseTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,10 @@ public function test404ResponseWithRetryAfterHeader(): void
587587
$this->assertFalse(true, 'The exception should have been fired !');
588588
} catch (ServerResponseException $e) {
589589
$this->assertSame(1500, $e->getRetryAfterHeaderValue());
590+
$this->assertSame(1500, $e->retryAfter);
590591
}
591592
}
592-
593+
593594
public function test422ResponseWithRetryAfterHeader(): void
594595
{
595596
$tokens = [

0 commit comments

Comments
 (0)