Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function statsAreReturnedFromHelper(): void |
||
31 | { |
||
32 | $stats = new VisitsStats(5); |
||
33 | $getStats = $this->helper->getVisitsStats()->willReturn($stats); |
||
34 | |||
35 | /** @var JsonResponse $resp */ |
||
36 | $resp = $this->action->handle(ServerRequestFactory::fromGlobals()); |
||
37 | $payload = $resp->getPayload(); |
||
38 | |||
39 | self::assertEquals($payload, ['visits' => $stats]); |
||
40 | $getStats->shouldHaveBeenCalledOnce(); |
||
41 | } |
||
43 |