Skip to content

Testing

phil/opening-hours
AreaWhat is covered
Times, ranges, daysEvery written form, refusals, ranges past midnight, overlaps
OpeningHours, SpecialHoursOpen or not at boundaries and in other time zones, the night before, special hours, next openings, runs
HoursText, OpeningHoursSchema, OpeningHoursArrayLines, labels, specifications, the round trip and each refusal

Infection holds the library at 100 % of mutants killed.

vendor/bin/phpunit packages/opening-hours/tests

Benchmarks

The phpbench benchmarks in tests/Benchmark/ measure nextOpening() for open and always-closed places with up to a hundred special periods. From the monorepo root:

composer bench -- packages/opening-hours/tests/Benchmark