Breaking down the insurmountable task of writing legacy tests in Symfony
November 3rd, 2009
No comments
If you’ve inherited an application written with the Symfony framework that doesn’t include functional tests (or you just plain didn’t write them to being with) it can seem like an insurmountable task to create any significant level of code coverage. I found myself in this position and felt overwhelmed by the task ahead of me.
Heeding the advice of my productivity guru: “don’t bite off more than you can chew” (thanks ma!), I used the following grep sequence to generate some organic milestones. Now I know the number of actions per module
grep -c "function execute[A-Z]" apps/frontend/ -R | grep ".php:" | grep -v ":0$" | grep -v "components.class.php"
Categories: Symfony