Open renehernandez opened 5 years ago
@nohwnd Can you add this issue to the Better Mock milestone?
Still an issue in 5.3.3 and conflict still allowed in PowerShell 7.
Note to implementer:
Current behavior for static parameters is in Repair-ConflictingParameters
.
Need to repeat this, converting conflictingParam
to _conflictingParam
with original name as alias, in Get-DynamicParamBlock
(with AST-parsing) and Get-DynamicParametersForCmdlet
.
Even though the description above seems scary, most of the work has been done before for other parameters, and in the functions named above you'd find an almost complete implementation, it just needs to be extended for PSEdition.
1. General summary of the issue
PSEdition
, which is a conflicting parameter name, is not being properly handled while mocking if it is used for a dynamic parameterThe following function and test highlight the issue:
2. Describe Your Environment
3. Expected Behavior
It should pass
4.Current Behavior
It fails
5. Possible Solution
Add corresponding implementation for dynamic parameter for what was done for regular parameters
6. Context
This is related to #1007 and #1128