Skip to content

Commit 596b2c0

Browse files
Add changelog
1 parent 696a3f8 commit 596b2c0

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/Symfony/Component/BrowserKit/AbstractBrowser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function xmlHttpRequest(string $method, string $uri, array $parameters =
162162
}
163163

164164
/**
165-
* Converts the request parameters into a json string and use it as request content.
165+
* Converts the request parameters into a json string and used it as request content.
166166
*/
167167
public function jsonRequest(string $method, string $uri, array $parameters = [], array $server = [], bool $changeHistory = true): Crawler
168168
{

src/Symfony/Component/BrowserKit/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
5.3.0
5+
-----
6+
7+
* Added `jsonRequest` method to `AbstractBrowser`
8+
49
4.3.0
510
-----
611

src/Symfony/Component/BrowserKit/Tests/AbstractBrowserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ public function testJsonRequest()
6464
{
6565
$client = $this->getBrowser();
6666
$client->jsonRequest('GET', 'http://example.com/', ['param' => 1], [], true);
67-
$this->assertEquals($client->getRequest()->getServer()['CONTENT_TYPE'], 'application/json');
68-
$this->assertEquals($client->getRequest()->getServer()['HTTP_ACCEPT'], 'application/json');
67+
$this->assertSame('application/json', $client->getRequest()->getServer()['CONTENT_TYPE']);
68+
$this->assertSame('application/json', $client->getRequest()->getServer()['HTTP_ACCEPT']);
6969
$this->assertFalse($client->getServerParameter('CONTENT_TYPE', false));
7070
$this->assertFalse($client->getServerParameter('HTTP_ACCEPT', false));
71-
$this->assertEquals('{"param":1}', $client->getRequest()->getContent());
71+
$this->assertSame('{"param":1}', $client->getRequest()->getContent());
7272
}
7373

7474
public function testGetRequestWithIpAsHttpHost()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy