Skip to content

Commit ff5f03f

Browse files
committed
v3.4.1
1 parent 0a732ef commit ff5f03f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Request/UrlEncodedRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private static function createBody($data, int $encodingType): StreamInterface
7070
return $data;
7171
}
7272

73-
$encodedData = http_build_query($data, '', '', $encodingType);
73+
$encodedData = http_build_query($data, '', '&', $encodingType);
7474

7575
$stream = new PhpTempStream('r+b');
7676
$stream->write($encodedData);

tests/Request/UrlEncodedRequestTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public function testConstructorWithArray(): void
2525

2626
public function testConstructorWithObject(): void
2727
{
28-
$request = new UrlEncodedRequest('POST', '/', (object) ['foo' => 'bar']);
28+
$request = new UrlEncodedRequest('POST', '/', (object) ['foo' => 'bar', 'bar' => 'baz']);
2929

30-
$this->assertSame('foo=bar', $request->getBody()->__toString());
30+
$this->assertSame('foo=bar&bar=baz', $request->getBody()->__toString());
3131
}
3232

3333
public function testConstructorWithDefaultEncodingType(): void

0 commit comments

Comments
 (0)