fix merge
This commit is contained in:
parent
4ee591bec6
commit
9610daf1bc
@ -49,59 +49,6 @@ class CurlHttpClientTest extends HttpClientTestCase
|
||||
self::assertSame(9876, $curlInfo['local_port']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHP 7.2.17
|
||||
*/
|
||||
public function testHttp2PushVulcain()
|
||||
{
|
||||
$client = $this->getVulcainClient();
|
||||
$logger = new TestLogger();
|
||||
$client->setLogger($logger);
|
||||
|
||||
$responseAsArray = $client->request('GET', 'https://127.0.0.1:3000/json', [
|
||||
'headers' => [
|
||||
'Preload' => '/documents/*/id',
|
||||
],
|
||||
])->toArray();
|
||||
|
||||
foreach ($responseAsArray['documents'] as $document) {
|
||||
$client->request('GET', 'https://127.0.0.1:3000'.$document['id'])->toArray();
|
||||
}
|
||||
|
||||
$client->reset();
|
||||
|
||||
$expected = [
|
||||
'Request: "GET https://127.0.0.1:3000/json"',
|
||||
'Queueing pushed response: "https://127.0.0.1:3000/json/1"',
|
||||
'Queueing pushed response: "https://127.0.0.1:3000/json/2"',
|
||||
'Queueing pushed response: "https://127.0.0.1:3000/json/3"',
|
||||
'Response: "200 https://127.0.0.1:3000/json"',
|
||||
'Accepting pushed response: "GET https://127.0.0.1:3000/json/1"',
|
||||
'Response: "200 https://127.0.0.1:3000/json/1"',
|
||||
'Accepting pushed response: "GET https://127.0.0.1:3000/json/2"',
|
||||
'Response: "200 https://127.0.0.1:3000/json/2"',
|
||||
'Accepting pushed response: "GET https://127.0.0.1:3000/json/3"',
|
||||
'Response: "200 https://127.0.0.1:3000/json/3"',
|
||||
];
|
||||
$this->assertSame($expected, $logger->logs);
|
||||
}
|
||||
|
||||
/**
|
||||
* @requires PHP 7.2.17
|
||||
*/
|
||||
public function testHttp2PushVulcainWithUnusedResponse()
|
||||
{
|
||||
$client = $this->getVulcainClient();
|
||||
$logger = new TestLogger();
|
||||
$client->setLogger($logger);
|
||||
|
||||
$responseAsArray = $client->request('GET', 'https://127.0.0.1:3000/json', [
|
||||
'headers' => [
|
||||
'Preload' => '/documents/*/id',
|
||||
],
|
||||
])->toArray();
|
||||
}
|
||||
|
||||
public function testTimeoutIsNotAFatalError()
|
||||
{
|
||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||
|
Reference in New Issue
Block a user