title: PhpUnit Mock an inbuilt function
body: <p>Is there a way to mock/override an inbuilt function <code>shell_exec</code> in <code>PHPUnit</code>. I am aware of <code>Mockery</code> and I cannot use other libraries apart from <code>PHPUnit</code>.</p>
  <p>I have tried for more than 3 hours and somewhere stuck. Any pointers / links would be highly appreciated.</p>
  <p>I am using Zend-Framework 2.</p>