Allow mocking otherwise unmockable functions with PHPUnit