updated composer

This commit is contained in:
2021-05-18 13:47:03 +00:00
parent e248cd036c
commit ba92152daa
1187 changed files with 20804 additions and 22320 deletions

View File

@@ -29,7 +29,7 @@ foreach ($_SERVER as $k => $v) {
}
}
$json = json_encode($vars, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
$json = json_encode($vars, \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE);
switch ($vars['REQUEST_URI']) {
default:
@@ -111,7 +111,7 @@ switch ($vars['REQUEST_URI']) {
break;
case '/post':
$output = json_encode($_POST + ['REQUEST_METHOD' => $vars['REQUEST_METHOD']], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
$output = json_encode($_POST + ['REQUEST_METHOD' => $vars['REQUEST_METHOD']], \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_UNESCAPED_UNICODE);
header('Content-Type: application/json', true);
header('Content-Length: '.strlen($output));
echo $output;

View File

@@ -1038,4 +1038,20 @@ abstract class HttpClientTestCase extends TestCase
$this->assertLessThan(10, $duration);
}
public function testWithOptions()
{
$client = $this->getHttpClient(__FUNCTION__);
if (!method_exists($client, 'withOptions')) {
$this->markTestSkipped(sprintf('Not implementing "%s::withOptions()" is deprecated.', get_debug_type($client)));
}
$client2 = $client->withOptions(['base_uri' => 'http://localhost:8057/']);
$this->assertNotSame($client, $client2);
$this->assertSame(\get_class($client), \get_class($client2));
$response = $client2->request('GET', '/');
$this->assertSame(200, $response->getStatusCode());
}
}