#phpunit — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #phpunit, aggregated by home.social.
-
"Technical debt is not malice"
https://phpunit.expert/articles/technical-debt-is-not-malice.html"Technical debt is not malice, it is context. An argument for why empathy is a technical skill that matters more than you think." #php #phpunit #techdebt
-
"No single technique is sufficient. Static analysis detects obvious errors at low cost. Traditional dynamic testing with PHPUnit verifies specific behaviours. Property-based testing generalises these behaviours. Mutation testing validates the quality of the test suite. Fuzz testing explores the unknown."
https://phpunit.expert/articles/everything-we-have.html -
Spent a couple hours today working with a colleague on a property test using #eris. We found one bug in the implementation of our oracle, which proved that our production code was actually doing the right thing, though it's unclear if that was deliberate or accidental. After that we increased the number of samples to 1000 which actually seems to have uncovered another bug.
Really cool to finally have a good use case for property based testing.
-
🔧 Configurable thresholds for scan warnings, query cost limits & small table optimization
🧩 Custom analyser support via QueryAnalyser interface for PostgreSQL or other databases
🎯 Works with #PHPUnit setUp() & #Pest beforeEach() including "paranoid mode"📦 composer require --dev mattiasgeniar/phpunit-query-count-assertions
Requires PHP 8.2+, Laravel 11/12, PHPUnit 11
https://github.com/mattiasgeniar/phpunit-query-count-assertions -
I think it would be really useful if #PHPUnit was able to fail a test if the SUT generates #PSR-3 log errors. This issue could do with input: https://github.com/sebastianbergmann/phpunit/issues/4437 #PHP #UnitTesting