1
0
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:
Daniil Gentili 2019-06-01 13:21:06 +02:00
parent bc191a8380
commit a7b2cc8d95
2 changed files with 10 additions and 10 deletions

View File

@ -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';

View File

@ -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());
});
}