Skip to content

Testing

phil/url
AreaWhat is covered
UrlEvery accepted and refused form, normalisation, length limits, isOn(), display(), segments()
KnownUrlTypeEach domain of each kind, Mastodon profiles and look-alikes, labels
UrlTypes, TypedUrlDetection among sets in order, an application's kinds before or after the international ones, refusals

Infection holds the library at 100 % of mutants killed.

vendor/bin/phpunit packages/url/tests

Benchmarks

The phpbench benchmarks in tests/Benchmark/ measure Url::fromString() and display() on short, typical, international and long addresses, and on a refused one. From the monorepo root:

composer bench -- packages/url/tests/Benchmark