Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Oct 13, 2023
1 parent 529058f commit 142e214
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "YurunHttp 是开源的 PHP HTTP 类库,支持链式操作,简单易用。支持 Curl、Swoole,支持 Http、Http2、WebSocket!",
"require": {
"php": ">=7.1",
"psr/http-message": "~1.0|~2.0",
"psr/http-message": "~1.0",
"psr/log": "~1.0|~2.0|~3.0"
},
"require-dev": {
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/HttpRequestTest/HttpRequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function testPostParams(): void
{
$this->call(function () {
$http = new HttpRequest();
$time = time();
$time = (string) time();
$response = $http->post($this->host . '?a=info', [
'time' => $time,
]);
Expand All @@ -104,7 +104,7 @@ public function testPostParams(): void
$this->assertEquals($time, isset($data['post']['time']) ? $data['post']['time'] : null);

$http = new HttpRequest();
$time = time();
$time = (string) time();
$params = new \stdClass();
$params->time = $time;
$this->assertResponse($response);
Expand Down Expand Up @@ -710,9 +710,9 @@ public function testBug19(): void
{
$this->call(function () {
$http = new HttpRequest();
$response = $http->head('https://www.baidu.com');
$response = $http->head('https://www.bing.com');
$this->assertResponse($response);
$response = $http->get('https://www.baidu.com');
$response = $http->get('https://www.bing.com');
$this->assertResponse($response);
$this->assertTrue('' != $response->body());
});
Expand Down

0 comments on commit 142e214

Please sign in to comment.