Skip to content

Commit

Permalink
Merge branch '4.4'
Browse files Browse the repository at this point in the history
* 4.4:
  [Cache] Fixed undefined variable in ArrayTrait
  [HttpClient] revert bad logic around JSON_THROW_ON_ERROR
  [HttpKernel] Fix handling non-catchable fatal errors
  Fix json-encoding when JSON_THROW_ON_ERROR is used
  [HttpFoundation] work around PHP 7.3 bug related to json_encode()
  [HttpClient] add $response->cancel()
  [Security] added support for updated \"distinguished name\" format in x509 authentication
  • Loading branch information
nicolas-grekas committed Jun 5, 2019
2 parents 89cc6c5 + 2201cef commit 2d19b12
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions HttpClient/Test/HttpClientTestCase.php
Expand Up @@ -495,6 +495,16 @@ public function testPostCallback()
$this->assertSame(['foo' => '0123456789', 'REQUEST_METHOD' => 'POST'], $response->toArray());
}

public function testCancel()
{
$client = $this->getHttpClient(__FUNCTION__);
$response = $client->request('GET', 'http://localhost:8057/timeout-header');

$response->cancel();
$this->expectException(TransportExceptionInterface::class);
$response->getHeaders();
}

public function testOnProgressCancel()
{
$client = $this->getHttpClient(__FUNCTION__);
Expand Down

0 comments on commit 2d19b12

Please sign in to comment.