Skip to content

Commit

Permalink
Added PHPUnit 6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel committed Nov 18, 2017
1 parent 6e58b16 commit 7a0706b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"evenement/evenement": "^3.0 || ^2.0 || ^1.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^4.8.35",
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35",
"clue/stream-filter": "~1.2"
},
"suggest": {
Expand Down
6 changes: 3 additions & 3 deletions tests/DuplexResourceStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ public function testConstructorWithExcessiveMode()

/**
* @covers React\Stream\DuplexResourceStream::__construct
* @expectedException InvalidArgumentException
*/
public function testConstructorThrowsExceptionOnInvalidStream()
{
$loop = $this->createLoopMock();

$this->setExpectedException('InvalidArgumentException');
new DuplexResourceStream('breakme', $loop);
}

/**
* @covers React\Stream\DuplexResourceStream::__construct
* @expectedException InvalidArgumentException
*/
public function testConstructorThrowsExceptionOnWriteOnlyStream()
{
Expand All @@ -56,7 +57,6 @@ public function testConstructorThrowsExceptionOnWriteOnlyStream()

$loop = $this->createLoopMock();

$this->setExpectedException('InvalidArgumentException');
new DuplexResourceStream(STDOUT, $loop);
}

Expand All @@ -77,6 +77,7 @@ public function testConstructorThrowsExceptionOnWriteOnlyStreamWithExcessiveMode

/**
* @covers React\Stream\DuplexResourceStream::__construct
* @expectedException RunTimeException
*/
public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking()
{
Expand All @@ -87,7 +88,6 @@ public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking(
$stream = fopen('blocking://test', 'r+');
$loop = $this->createLoopMock();

$this->setExpectedException('RuntimeException');
new DuplexResourceStream($stream, $loop);
}

Expand Down
6 changes: 3 additions & 3 deletions tests/ReadableResourceStreamTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ public function testConstructorWithExcessiveMode()

/**
* @covers React\Stream\ReadableResourceStream::__construct
* @expectedException InvalidArgumentException
*/
public function testConstructorThrowsExceptionOnInvalidStream()
{
$loop = $this->createLoopMock();

$this->setExpectedException('InvalidArgumentException');
new ReadableResourceStream(false, $loop);
}

/**
* @covers React\Stream\ReadableResourceStream::__construct
* @expectedException InvalidArgumentException
*/
public function testConstructorThrowsExceptionOnWriteOnlyStream()
{
Expand All @@ -55,7 +56,6 @@ public function testConstructorThrowsExceptionOnWriteOnlyStream()

$loop = $this->createLoopMock();

$this->setExpectedException('InvalidArgumentException');
new ReadableResourceStream(STDOUT, $loop);
}

Expand All @@ -76,6 +76,7 @@ public function testConstructorThrowsExceptionOnWriteOnlyStreamWithExcessiveMode

/**
* @covers React\Stream\ReadableResourceStream::__construct
* @expectedException RuntimeException
*/
public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking()
{
Expand All @@ -86,7 +87,6 @@ public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking(
$stream = fopen('blocking://test', 'r+');
$loop = $this->createLoopMock();

$this->setExpectedException('RuntimeException');
new ReadableResourceStream($stream, $loop);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/WritableStreamResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public function testConstructorThrowsExceptionOnReadOnlyStreamWithExcessiveMode(

/**
* @covers React\Stream\WritableResourceStream::__construct
* @expectedException RuntimeException
*/
public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking()
{
Expand All @@ -85,7 +86,6 @@ public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking(
$stream = fopen('blocking://test', 'r+');
$loop = $this->createLoopMock();

$this->setExpectedException('RuntimeException');
new WritableResourceStream($stream, $loop);
}

Expand Down

0 comments on commit 7a0706b

Please sign in to comment.