Skip to content

Commit 2f4b224

Browse files
authored
Merge pull request #115 from andig/composer2
Fix minimum phpunit version and allow v5
2 parents 01f00e4 + a5e1687 commit 2f4b224

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
}
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "~4.8"
19+
"phpunit/phpunit": "^4.8.10||^5.0"
2020
}
2121
}

tests/ResponseTest.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ public function testResponseShouldBeChunkedEvenWithOtherTransferEncoding()
3434
$expected .= "Transfer-Encoding: chunked\r\n";
3535
$expected .= "\r\n";
3636

37-
$conn = $this->getMock('React\Socket\ConnectionInterface');
37+
$conn = $this
38+
->getMockBuilder('React\Socket\ConnectionInterface')
39+
->getMock();
3840
$conn
3941
->expects($this->once())
4042
->method('write')
@@ -73,7 +75,9 @@ public function testResponseShouldNotBeChunkedWithContentLengthCaseInsensitive()
7375
$expected .= "CONTENT-LENGTH: 0\r\n";
7476
$expected .= "\r\n";
7577

76-
$conn = $this->getMock('React\Socket\ConnectionInterface');
78+
$conn = $this
79+
->getMockBuilder('React\Socket\ConnectionInterface')
80+
->getMock();
7781
$conn
7882
->expects($this->once())
7983
->method('write')
@@ -91,7 +95,9 @@ public function testResponseShouldIncludeCustomByPoweredAsFirstHeaderIfGivenExpl
9195
$expected .= "X-POWERED-BY: demo\r\n";
9296
$expected .= "\r\n";
9397

94-
$conn = $this->getMock('React\Socket\ConnectionInterface');
98+
$conn = $this
99+
->getMockBuilder('React\Socket\ConnectionInterface')
100+
->getMock();
95101
$conn
96102
->expects($this->once())
97103
->method('write')
@@ -108,7 +114,9 @@ public function testResponseShouldNotIncludePoweredByIfGivenEmptyArray()
108114
$expected .= "Content-Length: 0\r\n";
109115
$expected .= "\r\n";
110116

111-
$conn = $this->getMock('React\Socket\ConnectionInterface');
117+
$conn = $this
118+
->getMockBuilder('React\Socket\ConnectionInterface')
119+
->getMock();
112120
$conn
113121
->expects($this->once())
114122
->method('write')

0 commit comments

Comments
 (0)