mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Use correct casing for cmdlet name and cmdlet parameter name in *.ps1 files (#12584)
This commit is contained in:
@@ -35,7 +35,7 @@ Describe "Tests for hashtable to PSCustomObject conversion" -Tags "CI" {
|
||||
|
||||
It 'Type Validation: <Name>' -TestCases:$testdata {
|
||||
param ($Name, $Cmd, $ExpectedType)
|
||||
Invoke-expression $Cmd -OutVariable a
|
||||
Invoke-Expression $Cmd -OutVariable a
|
||||
$a = Get-Variable -Name a -ValueOnly
|
||||
$a | Should -BeOfType $ExpectedType
|
||||
}
|
||||
@@ -47,7 +47,7 @@ Describe "Tests for hashtable to PSCustomObject conversion" -Tags "CI" {
|
||||
|
||||
$p = 0
|
||||
# Checks if the first property is One
|
||||
$x.psobject.Properties | foreach-object `
|
||||
$x.psobject.Properties | ForEach-Object `
|
||||
{
|
||||
if ($p -eq 0)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ Describe "Tests for hashtable to PSCustomObject conversion" -Tags "CI" {
|
||||
|
||||
$p = 0
|
||||
# Checks if the first property is One
|
||||
$x.psobject.Properties | foreach-object `
|
||||
$x.psobject.Properties | ForEach-Object `
|
||||
{
|
||||
if ($p -eq 0)
|
||||
{
|
||||
@@ -136,7 +136,7 @@ Describe "Tests for hashtable to PSCustomObject conversion" -Tags "CI" {
|
||||
$obj = $null
|
||||
$ht = @{one=1;two=2}
|
||||
|
||||
{ $obj = New-Object System.Management.Automation.PSCustomObject -property $ht } |
|
||||
{ $obj = New-Object System.Management.Automation.PSCustomObject -Property $ht } |
|
||||
Should -Throw -ErrorId "CannotFindAppropriateCtor,Microsoft.PowerShell.Commands.NewObjectCommand"
|
||||
$obj | Should -BeNullOrEmpty
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user