HEX
Server: Apache
System: Linux webm013.cluster123.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: lesanew (165608)
PHP: 8.3.31
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/lesanew/anestetues2/web/app/themes/anes-tetues/vendor/roots/acorn/tests/Helpers.php
<?php

namespace Roots\Acorn\Tests;

use Mockery;
use Mockery\MockInterface;
use Spatie\TemporaryDirectory\TemporaryDirectory;

function acorn_root(?string $path = null)
{
    return dirname(__DIR__).($path ? "/{$path}" : '');
}

function plugin_entrypoint()
{
    return __DIR__.'/../acorn.php';
}

/**
 * Get a temporary directory
 *
 * @return string|TemporaryDirectory
 */
function temp(?string $path = null)
{
    static $temp;

    if (! $temp) {
        $temp = (new TemporaryDirectory)->create();

        register_shutdown_function(fn () => $temp->delete());
    }

    if ($path !== null) {
        return $temp->path($path);
    }

    return $temp;
}

function mock(string $class): MockInterface
{
    return Mockery::mock($class);
}