Skip to content

Instantly share code, notes, and snippets.

@techthoughts2
Created September 24, 2021 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techthoughts2/acd7dd2d749240c4be596c37b1c03446 to your computer and use it in GitHub Desktop.
Save techthoughts2/acd7dd2d749240c4be596c37b1c03446 to your computer and use it in GitHub Desktop.
$script:mockCalled = 0
$mockInvoke = {
$script:mockCalled++
if ($script:mockCalled -eq 1) {
return $false
}
elseif ($script:mockCalled -eq 2) {
return $true
}
}
Mock -CommandName Get-TableRowInfo -MockWith $mockInvoke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment