<commit_before>[CmdletBinding()]
param(
    [Parameter()]
    [string]
    $SharePointCmdletModule = (Join-Path -Path $PSScriptRoot `
                                         -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" `
                                         -Resolve)
)

Import-Module -Name (Join-Path -Path $PSScriptRoot `
                                -ChildPath "..\UnitTestHelper.psm1" `
                                -Resolve)

$Global:SPDscHelper = New-SPDscUnitTestHelper -SharePointStubModule $SharePointCmdletModule `
                                              -DscResource "SPBlobCacheSettings"

Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture {
    InModuleScope -ModuleName $Global:SPDscHelper.ModuleName -ScriptBlock {
        Invoke-Command -ScriptBlock $Global:SPDscHelper.InitializeScript -NoNewScope

        # Initialize the tests
        $relativePath = "\inetpub\wwwroot\Virtual Directories\8080"
        $Global:SPDscWebConfigPath = Join-Path -Path "TestDrive:\" -ChildPath $relativePath
        $Global:SPDscWebConfigRealPath = Join-Path -Path $TestDrive.FullName -ChildPath $relativePath
        $Global:SPDscWebConfigFile = Join-Path -Path $Global:SPDscWebConfigPath -ChildPath "web.config"
        New-Item -Path $Global:SPDscWebConfigPath -ItemType Directory

        try
        {
            [Microsoft.SharePoint.Administration.SPUrlZone]
        }
        catch
        {
            Add-Type -TypeDefinition @"
namespace Microsoft.SharePoint.Administration {
    public enum SPUrlZone { Default, Intranet, Internet, Custom, Extranet };
}
"@
        }

        # Mocks for all contexts
        Mock -CommandName Get-SPWebApplication -MockWith {
            return @{
                IISSettings =  @(@{
                    Path = $Global:SPDscWebConfigRealPath
                })
            }
        }

        Mock -CommandName Get-SPServiceInstance -MockWith {
            return @(@{
                Name = ""
                TypeName = "Microsoft SharePoint Foundation Web Application"
            })  | Add-Member -MemberType ScriptMethod `
            -Name GetType `
            -Value {
               return [PSObject]@{Name = "SPWebServiceInstance"}
            } -PassThru -Force
        }

        function Update-SPDscTestConfigFile
        {
            [CmdletBinding()]
            param(
                [Parameter(Mandatory = $true)]
                [String]
                $Content
            )
            Set-Content -Path $Global:SPDscWebConfigFile -Value $Content
        }
<commit_msg>Changed return object<commit_after>[CmdletBinding()]
param(
    [Parameter()]
    [string]
    $SharePointCmdletModule = (Join-Path -Path $PSScriptRoot `
                                         -ChildPath "..\Stubs\SharePoint\15.0.4805.1000\Microsoft.SharePoint.PowerShell.psm1" `
                                         -Resolve)
)

Import-Module -Name (Join-Path -Path $PSScriptRoot `
                                -ChildPath "..\UnitTestHelper.psm1" `
                                -Resolve)

$Global:SPDscHelper = New-SPDscUnitTestHelper -SharePointStubModule $SharePointCmdletModule `
                                              -DscResource "SPBlobCacheSettings"

Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture {
    InModuleScope -ModuleName $Global:SPDscHelper.ModuleName -ScriptBlock {
        Invoke-Command -ScriptBlock $Global:SPDscHelper.InitializeScript -NoNewScope

        # Initialize the tests
        $relativePath = "\inetpub\wwwroot\Virtual Directories\8080"
        $Global:SPDscWebConfigPath = Join-Path -Path "TestDrive:\" -ChildPath $relativePath
        $Global:SPDscWebConfigRealPath = Join-Path -Path $TestDrive.FullName -ChildPath $relativePath
        $Global:SPDscWebConfigFile = Join-Path -Path $Global:SPDscWebConfigPath -ChildPath "web.config"
        New-Item -Path $Global:SPDscWebConfigPath -ItemType Directory

        try
        {
            [Microsoft.SharePoint.Administration.SPUrlZone]
        }
        catch
        {
            Add-Type -TypeDefinition @"
namespace Microsoft.SharePoint.Administration {
    public enum SPUrlZone { Default, Intranet, Internet, Custom, Extranet };
}
"@
        }

        # Mocks for all contexts
        Mock -CommandName Get-SPWebApplication -MockWith {
            return @{
                IISSettings =  @(@{
                    Path = $Global:SPDscWebConfigRealPath
                })
            }
        }

        Mock -CommandName Get-SPServiceInstance -MockWith {
            return @(
                @{
                    Name = ""
                    TypeName = "Microsoft SharePoint Foundation Web Application"
                } | Add-Member -MemberType ScriptMethod `
                    -Name GetType `
                    -Value {
                        return @{Name = "SPWebServiceInstance"}
                    } -PassThru -Force)
            }
        }

        function Update-SPDscTestConfigFile
        {
            [CmdletBinding()]
            param(
                [Parameter(Mandatory = $true)]
                [String]
                $Content
            )
            Set-Content -Path $Global:SPDscWebConfigFile -Value $Content
        }

{'fraction_non_alphanumeric': 0.08874172185430464, 'fraction_numerical': 0.006433301797540208, 'mean_word_length': 1.6629722921914358, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6744302', 'n_tokens_mistral': 1438, 'n_tokens_neox': 1372, 'n_words': 260}