Skip to content

Commit 522cca6

Browse files
authored
Upgrade phpunit to 9.4 (#2617)
1 parent 0542831 commit 522cca6

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

tests/ResponseProxyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
class ResponseProxyTest extends ResponseTest
2222
{
23-
protected function tearDown()
23+
protected function tearDown(): void
2424
{
2525
parent::tearDown(); // TODO: Change the autogenerated stub
2626
}

tests/ResponseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
class ResponseTest extends TestCase
2323
{
24-
protected function tearDown()
24+
protected function tearDown(): void
2525
{
2626
\Mockery::close();
2727
}

tests/ServerRequestTest.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
class ServerRequestTest extends TestCase
3636
{
37-
protected function tearDown()
37+
protected function tearDown(): void
3838
{
3939
Mockery::close();
4040
RequestStub::setParser(null);
@@ -65,11 +65,10 @@ public function testNormalizeParsedBody()
6565
$this->assertSame($json, RequestStub::normalizeParsedBody($data, $request));
6666
}
6767

68-
/**
69-
* @expectedException \Hyperf\HttpMessage\Exception\BadRequestHttpException
70-
*/
7168
public function testNormalizeParsedBodyException()
7269
{
70+
$this->expectException(\Hyperf\HttpMessage\Exception\BadRequestHttpException::class);
71+
7372
$this->getContainer();
7473

7574
$json = ['name' => 'Hyperf'];
@@ -79,11 +78,10 @@ public function testNormalizeParsedBodyException()
7978
$this->assertSame([], RequestStub::normalizeParsedBody($json, $request));
8079
}
8180

82-
/**
83-
* @expectedException \Hyperf\HttpMessage\Exception\BadRequestHttpException
84-
*/
8581
public function testXmlNormalizeParsedBodyException()
8682
{
83+
$this->expectException(\Hyperf\HttpMessage\Exception\BadRequestHttpException::class);
84+
8785
$this->getContainer();
8886

8987
$json = ['name' => 'Hyperf'];

0 commit comments

Comments
 (0)