mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-05 21:28:15 +08:00
Deleted useless code.
This commit is contained in:
parent
56d5978c42
commit
9fca0bfb00
@ -27,11 +27,6 @@ use Swoole\Coroutine;
|
||||
*/
|
||||
class CoroutineHandlerTest extends TestCase
|
||||
{
|
||||
public function testExample()
|
||||
{
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
public function testCreatesCurlErrors()
|
||||
{
|
||||
if (Coroutine::getuid() > 0) {
|
||||
@ -115,21 +110,17 @@ class CoroutineHandlerTest extends TestCase
|
||||
|
||||
public function testUserInfo()
|
||||
{
|
||||
if (Coroutine::getuid() > 0) {
|
||||
$url = 'https://username:password@api.tb.swoft.lmx0536.cn';
|
||||
$handler = new CoroutineHandler();
|
||||
$request = new Request('GET', $url . '/echo');
|
||||
$url = 'https://username:password@api.tb.swoft.lmx0536.cn';
|
||||
$handler = new CoroutineHandler();
|
||||
$request = new Request('GET', $url . '/echo');
|
||||
|
||||
$res = $handler($request, ['timeout' => 5])->wait();
|
||||
$content = $res->getBody()->getContents();
|
||||
$json = json_decode($content, true);
|
||||
$res = $handler($request, ['timeout' => 5])->wait();
|
||||
$content = $res->getBody()->getContents();
|
||||
$json = json_decode($content, true);
|
||||
|
||||
$this->assertEquals(0, $json['code']);
|
||||
$json = $json['data'];
|
||||
$this->assertEquals('Basic ' . base64_encode('username:password'), $json['headers']['authorization'][0]);
|
||||
}
|
||||
|
||||
$this->assertTrue(true);
|
||||
$this->assertEquals(0, $json['code']);
|
||||
$json = $json['data'];
|
||||
$this->assertEquals('Basic ' . base64_encode('username:password'), $json['headers']['authorization'][0]);
|
||||
}
|
||||
|
||||
protected function getHandler($options = [])
|
||||
|
Loading…
Reference in New Issue
Block a user