I'm working on a Pester test for a log rotation function. One of the things I'd like to be able to do is mock Get-Date with a few different dates (yesterday, a week ago, etc.) to create test files and make sure my function rotates the logs correctly.
My problem is that I also rely heavily on Get-Date -Format 'yyyyMMdd-hhmm' (and a couple of other format Strings) for formatting dates in a couple of different ways for use in a filename and in a log entry.
Is it possible to reference the original Get-Date function from within a mock of Get-Date?
So far, I'm doing some trickery with ParameterFilters, but for some reason, it's providing double output.