phpunit –filter is faster than commenting tests out

Chasing one failure through a suite that takes four minutes usually ends with the other tests commented out — and one of them staying commented out, which nobody notices until it matters.

phpunit --filter testVatIsApplied
phpunit --filter '/::testVat.*Applied/'
phpunit tests/Billing/InvoiceTest.php
phpunit --group billing
phpunit --stop-on-failure

--filter matches against the qualified test name and accepts a regular expression, so it also selects a whole class or one data set. --group with an @group annotation is the durable version for a set you return to often. --stop-on-failure is worth adding while working, since the first failure is usually the informative one and the following twenty are consequences.