Declare a global script level variable, then make the mock operate on that variable. Parameters will be automatically injected into the scope of the mock function
funciton My-RealFunction {
param($Stuff)
...do something with stuff...
}
[stirng[]]$script:invokations = @()
Mock My-RealFunction {
$script:invokations += $Stuff #Stuff is injected automatically
}
... assertions based on $script:invokations ...