Zum Inhalt der Seite gehen


A couple of years ago I wrote a #php script that mucks around with some system files. Because I didn't want to break my system while testing the code, I wrote some relatively tedious tests in #phpunit with mock objects, validating the parameters that were passed down to the filesystem.

It was a real pain in the butt, but I got the thing debugged without making a mess of my working environment.

Today I decided to add a new feature, and there's no way to express how much time having all that stuff set up saved. I copied a similar test, adapted it to the new feature, got it to pass tests, and deployed it without issue.

Coding a good test suite pays back over, and over, and over again.

Diese Webseite verwendet Cookies. Durch die weitere Benutzung der Webseite stimmst du dieser Verwendung zu. https://inne.city/tos