Skip to content

Commit

Permalink
Fix test issues revealed after updating amphp/http-server
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Mar 26, 2023
1 parent 3b16929 commit abc5e45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/ClientHttpBinIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
};
Expand Down
3 changes: 0 additions & 3 deletions test/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit abc5e45

Please sign in to comment.