mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
test: add testSendProxied
This commit is contained in:
parent
1db90c402b
commit
9a41f6b18c
@ -718,6 +718,18 @@ final class CURLRequestTest extends CIUnitTestCase
|
||||
$this->assertSame('Hi there', $response->getBody());
|
||||
}
|
||||
|
||||
public function testSendProxied()
|
||||
{
|
||||
$request = $this->getRequest([
|
||||
'base_uri' => 'http://www.foo.com/api/v1/',
|
||||
'delay' => 100,
|
||||
]);
|
||||
|
||||
$request->setOutput("HTTP/1.1 200 Connection established:\x0d\x0a\x0d\x0aHi there");
|
||||
$response = $request->get('answer');
|
||||
$this->assertSame('Hi there', $response->getBody());
|
||||
}
|
||||
|
||||
/**
|
||||
* See: https://github.com/codeigniter4/CodeIgniter4/issues/3261
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user