diff --git a/test/ClientHttpBinIntegrationTest.php b/test/ClientHttpBinIntegrationTest.php index 47f4aaa9..9a050f01 100644 --- a/test/ClientHttpBinIntegrationTest.php +++ b/test/ClientHttpBinIntegrationTest.php @@ -20,7 +20,7 @@ use Amp\Http\Client\Interceptor\TooManyRedirectsException; use Amp\Http\Cookie\RequestCookie; use Amp\Http\Cookie\ResponseCookie; -use Amp\Http\Rfc7230; +use Amp\Http\Http1\Rfc7230; use Amp\PHPUnit\AsyncTestCase; use Amp\Pipeline\Pipeline; use Amp\Socket; @@ -187,7 +187,7 @@ public function testHeaderCase(): void $headers = \explode("\r\n", \trim($buffer)); \array_shift($headers); - $buffer = \json_encode(Rfc7230::parseRawHeaders(\implode("\r\n", $headers) . "\r\n")); + $buffer = \json_encode(Rfc7230::parseHeaderPairs(\implode("\r\n", $headers) . "\r\n")); $socket->write("HTTP/1.0 200 OK\r\n\r\n$buffer"); }; diff --git a/test/RequestTest.php b/test/RequestTest.php index 12ffe8a4..779f0711 100644 --- a/test/RequestTest.php +++ b/test/RequestTest.php @@ -132,9 +132,6 @@ public function testBody(): void $request->setBody("foobar"); $this->assertInstanceOf(StringBody::class, $request->getBody()); - $request->setBody(143); - $this->assertInstanceOf(StringBody::class, $request->getBody()); - $this->expectException(\TypeError::class); /** @noinspection PhpParamsInspection */