| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function testIndex() |
||
| 18 | { |
||
| 19 | $container = new Container(); |
||
| 20 | $container->set('hello.keys.public', CryptHelper::makeCryptKey('public')); |
||
| 21 | Container::setInstance($container); |
||
| 22 | |||
| 23 | $controller = new KeysController(); |
||
| 24 | /** @var JsonResponse $response */ |
||
| 25 | $response = $controller->callAction('index'); |
||
|
|
|||
| 26 | |||
| 27 | self::assertInstanceOf(JsonResponse::class, $response); |
||
| 28 | $content = $response->getContent(); |
||
| 29 | self::assertJson($content); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |
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: