Today, I'll share a trademark secret that allows us to move fast and make huge changes without fear. When we're starting a new [Symfony 2.8-7.2 upgrade project](/blog/off-the-beaten-path-to-upgrade-symfony-28-to-72), we cover it with a couple of tests first. These tests are not units, but smoke tests - with a couple of lines they cover a huge portion of the Symfony framework layer we use. With a couple of lines, we can cover complex container operations and avoid most dummy yet destructive bu...| tomasvotruba.com
The legacy projects we work with are often flooded with mocks. I already wrote [How to Remove Dead Mock Calls from PHPUnit Tests](/blog/how-to-remove-dead-mock-calls-from-phpunit-tests), which focuses on dealing with PHPUnit bloated syntax. Today, we look at the next wave of improvements that make tests more valuable, more accessible to upgrade and read, and even avoid false types.| tomasvotruba.com
When we come to a new code base, we look for a code quality metric that will tell us how healthy the code base is. We can have CI tools like PHPStan and PHPUnit. PHPStan reports missing or invalid types, and PHPUnit reports failing tests. But how do we know if 10 passing or 100 passing tests is enough? What if there are over 10 000 cases we should test?| tomasvotruba.com