You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$logFile[0] | Should -BeLike "2000-12-31 01:02:03 $Env:ComputerName$Env:Username Error ``[Write-ErrorLog.Tests.ps1:$callerLine``] Attempted to divide by zero. (RuntimeException: *\Unit\Write-ErrorLog.Tests.ps1:* char:*)"
171
-
$logFile[1] | Should -BeLike "at <ScriptBlock>, *\ScriptLogger\Tests\Unit\Write-ErrorLog.Tests.ps1:*"
170
+
$logFile[0] | Should -BeLike "2000-12-31 01:02:03 $Env:ComputerName$Env:Username Error ``[Write-ErrorLog.Tests.ps1:$callerLine``] Attempted to divide by zero. (RuntimeException: *Write-ErrorLog.Tests.ps1:* char:*)"
171
+
$logFile[1] | Should -BeLike "at <ScriptBlock>, *ScriptLogger*Tests*Unit*Write-ErrorLog.Tests.ps1:*"
172
172
}
173
173
}
174
174
@@ -216,7 +216,7 @@ Describe 'Write-ErrorLog' {
216
216
$eventLog.EventID| Should -Be 0
217
217
$eventLog.CategoryNumber| Should -Be 0
218
218
$eventLog.EntryType| Should -Be 'Error'
219
-
$eventLog.Message| Should -BeLike "The description for Event ID '0' in Source 'PowerShell' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event:'``[Write-ErrorLog.Tests.ps1:$callerLine``] Attempted to divide by zero. (RuntimeException: *\Unit\Write-ErrorLog.Tests.ps1:* char:*)'"
219
+
$eventLog.Message| Should -BeLike "The description for Event ID '0' in Source 'PowerShell' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event:'``[Write-ErrorLog.Tests.ps1:$callerLine``] Attempted to divide by zero. (RuntimeException: *Write-ErrorLog.Tests.ps1:* char:*)'"
220
220
$eventLog.Source| Should -Be 'PowerShell'
221
221
$eventLog.InstanceId| Should -Be 0
222
222
}
@@ -228,7 +228,7 @@ Describe 'Write-ErrorLog' {
228
228
229
229
InModuleScope 'ScriptLogger' {
230
230
231
-
Mock 'Show-ScriptLoggerErrorMessage'-ModuleName 'ScriptLogger'-ParameterFilter { $Message-eq'My Error'-or$Message-like'Attempted to divide by zero. (RuntimeException: *\Unit\Write-ErrorLog.Tests.ps1:* char:*)' } -Verifiable
231
+
Mock 'Show-ScriptLoggerErrorMessage'-ModuleName 'ScriptLogger'-ParameterFilter { $Message-eq'My Error'-or$Message-like'Attempted to divide by zero. (RuntimeException: *Write-ErrorLog.Tests.ps1:* char:*)' } -Verifiable
0 commit comments