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