Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function callFallback() |
||
23 | { |
||
24 | $env = Phake::mock(Environment::class); |
||
25 | $laravelKernel = Phake::mock(LaravelKernel::class); |
||
26 | |||
27 | Phake::when($laravelKernel)->handle($this->isInstanceOf(Request::class)) |
||
28 | ->thenReturn(new \Illuminate\Http\Response()); |
||
29 | |||
30 | $controller = new FallbackController($env, $laravelKernel); |
||
31 | $controller->fallback(); |
||
32 | |||
33 | Phake::verify($env)->put(); |
||
34 | Phake::verify($laravelKernel)->handle($this->isInstanceOf(Request::class)); |
||
35 | Phake::verify($laravelKernel)->terminate( |
||
36 | $this->isInstanceOf(Request::class), |
||
37 | $this->isInstanceOf(Response::class) |
||
38 | ); |
||
39 | } |
||
40 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: