base_path
is a standard Laravel helper. It's available every time Laravel boots. The proper approach is booting Laravel in your tests via the TestCase
base class included in Laravel. Refer to the official testing guide and this laracast.
You should not mock the method. You should not replace it with file references and string assembly. Doing either of these moves the code away from Laravel integration, not toward, as you wanted to do with the L5 upgrade.