Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/DuplexResourceStreamIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function () {
return function_exists('event_base_new');
},
function () {
return class_exists('React\EventLoop\ExtLibeventLoop') ? new ExtLibeventLoop() : LibEventLoop();
return class_exists('React\EventLoop\ExtLibeventLoop') ? new ExtLibeventLoop() : new LibEventLoop();
}
),
array(
Expand Down
6 changes: 5 additions & 1 deletion tests/DuplexResourceStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ class DuplexResourceStreamTest extends TestCase
{
/**
* @covers React\Stream\DuplexResourceStream::__construct
* @doesNotPerformAssertions
*/
public function testConstructor()
{
$stream = fopen('php://temp', 'r+');
$loop = $this->createLoopMock();

$conn = new DuplexResourceStream($stream, $loop);
new DuplexResourceStream($stream, $loop);
}

/**
* @covers React\Stream\DuplexResourceStream::__construct
* @doesNotPerformAssertions
*/
public function testConstructorWithExcessiveMode()
{
Expand Down Expand Up @@ -93,6 +95,7 @@ public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking(

/**
* @covers React\Stream\DuplexResourceStream::__construct
* @doesNotPerformAssertions
*/
public function testConstructorAcceptsBuffer()
{
Expand Down Expand Up @@ -405,6 +408,7 @@ public function testClosingStreamInDataEventShouldNotTriggerError()
$loop = $this->createLoopMock();

$conn = new DuplexResourceStream($stream, $loop);
$conn->on('error', $this->expectCallableNever());
$conn->on('data', function ($data) use ($conn) {
$conn->close();
});
Expand Down
3 changes: 3 additions & 0 deletions tests/ReadableResourceStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class ReadableResourceStreamTest extends TestCase
{
/**
* @covers React\Stream\ReadableResourceStream::__construct
* @doesNotPerformAssertions
*/
public function testConstructor()
{
Expand All @@ -20,6 +21,7 @@ public function testConstructor()

/**
* @covers React\Stream\ReadableResourceStream::__construct
* @doesNotPerformAssertions
*/
public function testConstructorWithExcessiveMode()
{
Expand Down Expand Up @@ -224,6 +226,7 @@ public function testClosingStreamInDataEventShouldNotTriggerError()
$loop = $this->createLoopMock();

$conn = new ReadableResourceStream($stream, $loop);
$conn->on('error', $this->expectCallableNever());
$conn->on('data', function ($data) use ($conn) {
$conn->close();
});
Expand Down
5 changes: 3 additions & 2 deletions tests/WritableStreamResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ class WritableResourceStreamTest extends TestCase
{
/**
* @covers React\Stream\WritableResourceStream::__construct
* @doesNotPerformAssertions
*/
public function testConstructor()
{
$stream = fopen('php://temp', 'r+');
$loop = $this->createLoopMock();

$buffer = new WritableResourceStream($stream, $loop);
$buffer->on('error', $this->expectCallableNever());
new WritableResourceStream($stream, $loop);
}

/**
* @covers React\Stream\WritableResourceStream::__construct
* @doesNotPerformAssertions
*/
public function testConstructorWithExcessiveMode()
{
Expand Down