assertEquals([ 'referer' => 'some site', 'date' => ($date ?? $visit->getDate())->toAtomString(), 'userAgent' => 'Chrome', 'visitLocation' => null, // Deprecated 'remoteAddr' => null, ], $visit->jsonSerialize()); } public function provideDates(): array { return [ [null], [Chronos::now()->subDays(10)], ]; } }