Skip to content

Commit

Permalink
strict types in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
denismitr committed Jul 3, 2019
1 parent 7e282d7 commit b088ceb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/EtagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Denismitr\ETag\ETagMiddleware;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Mockery as m;

class Test extends \Orchestra\Testbench\TestCase
Expand Down Expand Up @@ -190,7 +191,7 @@ public function it_returns_the_response_untouched_if_response_does_not_want_json
* @param Response $response
* @return Response
*/
protected function runMiddleware($request, $response)
protected function runMiddleware(Request $request, Response $response)
{
$middleware = new ETagMiddleware;

Expand All @@ -210,7 +211,7 @@ protected function getValidEtag(string $content): string
}


protected function getResponseMockWithEtag(string $content, $etag)
protected function getResponseMockWithEtag(string $content, string $etag)
{
$response = m::mock('Illuminate\Http\Response')
->shouldReceive('getStatusCode')
Expand All @@ -229,7 +230,7 @@ protected function getResponseMockWithEtag(string $content, $etag)
return $response;
}

protected function getResponseWithErrorCode($code = 401, $times = 1)
protected function getResponseWithErrorCode(int $code = 401, int $times = 1)
{
$response = m::mock('Illuminate\Http\Response');

Expand Down

0 comments on commit b088ceb

Please sign in to comment.