Skip to content

Commit 7a0706b

Browse files
committed
Added PHPUnit 6 support
1 parent 6e58b16 commit 7a0706b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"evenement/evenement": "^3.0 || ^2.0 || ^1.0"
1010
},
1111
"require-dev": {
12-
"phpunit/phpunit": "^5.7 || ^4.8.35",
12+
"phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35",
1313
"clue/stream-filter": "~1.2"
1414
},
1515
"suggest": {

tests/DuplexResourceStreamTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,18 @@ public function testConstructorWithExcessiveMode()
3636

3737
/**
3838
* @covers React\Stream\DuplexResourceStream::__construct
39+
* @expectedException InvalidArgumentException
3940
*/
4041
public function testConstructorThrowsExceptionOnInvalidStream()
4142
{
4243
$loop = $this->createLoopMock();
4344

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

4848
/**
4949
* @covers React\Stream\DuplexResourceStream::__construct
50+
* @expectedException InvalidArgumentException
5051
*/
5152
public function testConstructorThrowsExceptionOnWriteOnlyStream()
5253
{
@@ -56,7 +57,6 @@ public function testConstructorThrowsExceptionOnWriteOnlyStream()
5657

5758
$loop = $this->createLoopMock();
5859

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

@@ -77,6 +77,7 @@ public function testConstructorThrowsExceptionOnWriteOnlyStreamWithExcessiveMode
7777

7878
/**
7979
* @covers React\Stream\DuplexResourceStream::__construct
80+
* @expectedException RunTimeException
8081
*/
8182
public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking()
8283
{
@@ -87,7 +88,6 @@ public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking(
8788
$stream = fopen('blocking://test', 'r+');
8889
$loop = $this->createLoopMock();
8990

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

tests/ReadableResourceStreamTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@ public function testConstructorWithExcessiveMode()
3535

3636
/**
3737
* @covers React\Stream\ReadableResourceStream::__construct
38+
* @expectedException InvalidArgumentException
3839
*/
3940
public function testConstructorThrowsExceptionOnInvalidStream()
4041
{
4142
$loop = $this->createLoopMock();
4243

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

4747
/**
4848
* @covers React\Stream\ReadableResourceStream::__construct
49+
* @expectedException InvalidArgumentException
4950
*/
5051
public function testConstructorThrowsExceptionOnWriteOnlyStream()
5152
{
@@ -55,7 +56,6 @@ public function testConstructorThrowsExceptionOnWriteOnlyStream()
5556

5657
$loop = $this->createLoopMock();
5758

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

@@ -76,6 +76,7 @@ public function testConstructorThrowsExceptionOnWriteOnlyStreamWithExcessiveMode
7676

7777
/**
7878
* @covers React\Stream\ReadableResourceStream::__construct
79+
* @expectedException RuntimeException
7980
*/
8081
public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking()
8182
{
@@ -86,7 +87,6 @@ public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking(
8687
$stream = fopen('blocking://test', 'r+');
8788
$loop = $this->createLoopMock();
8889

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

tests/WritableStreamResourceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function testConstructorThrowsExceptionOnReadOnlyStreamWithExcessiveMode(
7575

7676
/**
7777
* @covers React\Stream\WritableResourceStream::__construct
78+
* @expectedException RuntimeException
7879
*/
7980
public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking()
8081
{
@@ -85,7 +86,6 @@ public function testConstructorThrowsExceptionIfStreamDoesNotSupportNonBlocking(
8586
$stream = fopen('blocking://test', 'r+');
8687
$loop = $this->createLoopMock();
8788

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

0 commit comments

Comments
 (0)