Update support Guzzle 8 and PSR-7 3

This commit is contained in:
Alex
2026-11-10 21:49:08 +03:00
parent 0ee7382264
commit 1aa13336de
8 changed files with 156 additions and 19 deletions
+15
View File
@@ -130,6 +130,21 @@ final class ClientTest extends TestCase
$this->assertSame($responsePayload, $result);
}
#[Test]
public function requestNormalizesHttpMethodToUpperCase(): void
{
$this->requestFactoryMock
->expects($this->once())
->method('createRequest')
->with('GET', $this->anything())
->willReturn($this->requestMock);
$this->responseMock->method('getStatusCode')->willReturn(200);
$this->streamMock->method('__toString')->willReturn('{"id":987}');
$this->assertSame(['id' => 987], $this->client->request('get', '/me'));
}
#[Test]
public function successfulPostRequestWithJsonBody(): void
{