This question already has an answer here:
I'm currently writing unit tests for my PHP code. I've read that unit tests should not interract with external elements such as network and filesystem.
In my code i have a curl wrapper class to simplify curl calls (i just use
$response = CurlWrapper::call($url)) For my tests, i added a mock to replace this wrapper. my mock class returns predefined response based on the url. This way i avoid HTTP response times and my tests does not rely on an externaressource which can change at any moment.
Do i need to unit test my curl wrapper (the original one, not the mock) and if i need to, how can i test it ?