Use echo instead of write in order for phpunit to intercept output