mirror of
https://github.com/danog/byte-stream.git
synced 2024-11-27 04:14:49 +01:00
Change function names
This commit is contained in:
parent
bc191a8380
commit
a7b2cc8d95
@ -63,11 +63,11 @@ function buffer(InputStream $source): Promise
|
||||
}
|
||||
|
||||
/**
|
||||
* The php://input output buffer stream for the process associated with the currently active event loop.
|
||||
* The php://input input buffer stream for the process associated with the currently active event loop.
|
||||
*
|
||||
* @return ResourceInputStream
|
||||
*/
|
||||
function getInput(): ResourceInputStream
|
||||
function getInputBuffer(): ResourceInputStream
|
||||
{
|
||||
static $key = InputStream::class . '\\input';
|
||||
|
||||
@ -82,11 +82,11 @@ function getInput(): ResourceInputStream
|
||||
}
|
||||
|
||||
/**
|
||||
* The php://output stream for the process associated with the currently active event loop.
|
||||
* The php://output output buffer stream for the process associated with the currently active event loop.
|
||||
*
|
||||
* @return ResourceOutputStream
|
||||
*/
|
||||
function getOutput(): ResourceOutputStream
|
||||
function getOutputBuffer(): ResourceOutputStream
|
||||
{
|
||||
static $key = OutputStream::class . '\\output';
|
||||
|
||||
|
@ -8,19 +8,19 @@ use Amp\PHPUnit\TestCase;
|
||||
|
||||
class StdStreamTest extends TestCase
|
||||
{
|
||||
public function testGetInput()
|
||||
public function testGetInputBuffer()
|
||||
{
|
||||
Loop::run(function () {
|
||||
$stream = ByteStream\getInput();
|
||||
$this->assertSame($stream, ByteStream\getInput());
|
||||
$stream = ByteStream\getInputBuffer();
|
||||
$this->assertSame($stream, ByteStream\getInputBuffer());
|
||||
});
|
||||
}
|
||||
|
||||
public function testGetOutput()
|
||||
public function testGetOutputBuffer()
|
||||
{
|
||||
Loop::run(function () {
|
||||
$stream = ByteStream\getOutput();
|
||||
$this->assertSame($stream, ByteStream\getOutput());
|
||||
$stream = ByteStream\getOutputBuffer();
|
||||
$this->assertSame($stream, ByteStream\getOutputBuffer());
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user