samedi 31 janvier 2015

Unit testing Symfony service's internal behavior

I have a Symfony service that takes some input, generates a file and uploads that file via FTP. I'd like to test that the file format is correctly generated, however, this is never returned by the service for me to test in PHPUnit. The service's only public API is send(). How can I use PHPUnit to test the internal behavior of my service (the file format generated)?


Aucun commentaire:

Enregistrer un commentaire