I have a curl wrapper class for which I'm writing unit tests. The wrapper class is able to detect a lost or changed connection and restart a download accordingly. It does this by tracking how much data has been downloaded at fixed intervals.
Is there any way to manipulate the internet connection within a PHPUnit test?