Mock global functions with PHPUnit

I have worked on many different PHP-based projects and sometimes I need to modify old and not clean codes. There I have faced untested codes. However, not just there could need to mock global functions. Sometimes we need that for PHP built-in functions also. The code For example, you have a similar class:src/DateGetter.php As you… Continue reading Mock global functions with PHPUnit