Using PHPUnit with Gaufrette to unit test IO-dependent behaviour

Recently I wanted to test some class which uses heavily IO. I was refactoring some legacy code depending on file_get_contents and other file functions. To allow easy testing I added Gaufrette library and replaced all native PHP functions operating on IO. <?php use Gaufrette\Filesystem; class Generator {     /**      * @var Filesystem […]