@@ -16,14 +16,14 @@ class ProblemDetailsMiddlewareTest extends TestCase
1616{
1717 use ProblemDetailsAssertionsTrait;
1818
19- protected function setUp ()
19+ protected function setUp () : void
2020 {
2121 $ this ->request = $ this ->prophesize (ServerRequestInterface::class);
2222 $ this ->responseFactory = $ this ->prophesize (ProblemDetailsResponseFactory::class);
2323 $ this ->middleware = new ProblemDetailsMiddleware ($ this ->responseFactory ->reveal ());
2424 }
2525
26- public function acceptHeaders ()
26+ public function acceptHeaders () : array
2727 {
2828 return [
2929 'empty ' => ['' ],
@@ -34,7 +34,7 @@ public function acceptHeaders()
3434 ];
3535 }
3636
37- public function testSuccessfulDelegationReturnsDelegateResponse ()
37+ public function testSuccessfulDelegationReturnsDelegateResponse () : void
3838 {
3939 $ response = $ this ->prophesize (ResponseInterface::class);
4040 $ delegate = $ this ->prophesize (DelegateInterface::class);
@@ -52,7 +52,7 @@ public function testSuccessfulDelegationReturnsDelegateResponse()
5252 /**
5353 * @dataProvider acceptHeaders
5454 */
55- public function testDelegateNotReturningResponseResultsInProblemDetails (string $ accept )
55+ public function testDelegateNotReturningResponseResultsInProblemDetails (string $ accept ) : void
5656 {
5757 $ this ->request ->getHeaderLine ('Accept ' )->willReturn ($ accept );
5858
@@ -74,7 +74,7 @@ public function testDelegateNotReturningResponseResultsInProblemDetails(string $
7474 /**
7575 * @dataProvider acceptHeaders
7676 */
77- public function testThrowableRaisedByDelegateResultsInProblemDetails (string $ accept )
77+ public function testThrowableRaisedByDelegateResultsInProblemDetails (string $ accept ) : void
7878 {
7979 $ this ->request ->getHeaderLine ('Accept ' )->willReturn ($ accept );
8080
@@ -98,7 +98,7 @@ public function testThrowableRaisedByDelegateResultsInProblemDetails(string $acc
9898 /**
9999 * @dataProvider acceptHeaders
100100 */
101- public function testMiddlewareRegistersErrorHandlerToConvertErrorsToProblemDetails (string $ accept )
101+ public function testMiddlewareRegistersErrorHandlerToConvertErrorsToProblemDetails (string $ accept ) : void
102102 {
103103 $ this ->request ->getHeaderLine ('Accept ' )->willReturn ($ accept );
104104
@@ -124,7 +124,7 @@ public function testMiddlewareRegistersErrorHandlerToConvertErrorsToProblemDetai
124124 $ this ->assertSame ($ expected , $ result );
125125 }
126126
127- public function testRethrowsCaughtExceptionIfUnableToNegotiateAcceptHeader ()
127+ public function testRethrowsCaughtExceptionIfUnableToNegotiateAcceptHeader () : void
128128 {
129129 $ this ->request ->getHeaderLine ('Accept ' )->willReturn ('text/html ' );
130130 $ exception = new TestAsset \RuntimeException ('Thrown! ' , 507 );
0 commit comments