Skip to content

Testing

phil/phone-bundle
AreaWhat is covered
PhoneType, PhoneNumberTransformerRegions, showing, empty fields, refusals
ValidPhoneNumberValid and invalid numbers, types, countries, messages and codes
PhoneNumberColumnType, PhoneExtension, PhilPhoneBundleStorage, the filters, the configuration and the services

A functional suite boots a kernel with FrameworkBundle, DoctrineBundle on SQLite, TwigBundle and the bundle in Canada: PhoneBundleTest stores a number, validates in fr_CA, submits the field and renders the filters. Installed on its own, where FrameworkBundle is a development requirement, the suite is skipped.

vendor/bin/phpunit packages/phone-bundle/tests

Benchmarks

The phpbench benchmarks in tests/Benchmark measure the hot paths at several sizes. From the root of the monorepo:

composer bench -- packages/phone-bundle/tests/Benchmark