HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/switch4u.komma.nl/vendor/phpbench/phpbench/tests/PhpBenchTestCase.php
<?php

namespace PhpBench\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Filesystem\Filesystem;

class PhpBenchTestCase extends TestCase
{
    protected function workspacePath(string $path = null): string
    {
        $base = __DIR__ . '/Workspace';

        if (empty($path)) {
            return $base;
        }

        return $base . DIRECTORY_SEPARATOR . $path;
    }

    protected function initWorkspace(): void
    {
        if (file_exists($this->workspacePath())) {
            $filesystem = new Filesystem();
            $filesystem->remove($this->workspacePath());
        }

        mkdir($this->workspacePath(), 0777);
    }
}