mirror of
https://github.com/BushlanovDev/max-bot-api-client-php.git
synced 2026-11-25 13:15:21 +00:00
Update support Guzzle 8 and PSR-7 3
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user