Supported Versions: PHP 5 >= 5.2.1, PHP 7, PHP 8
Returns directory path used for temporary files
<?php sys_get_temp_dir(): string
<?php }
}
$root = sys_get_temp_dir().'/__lwcmdcache';
$cacheDir = $root.'/cache';
$cacheDir = $root.'/cache';
<?php protected function blade(string $template, $data = [])
{
$tempDirectory = sys_get_temp_dir();
if (! in_array($tempDirectory, ViewFacade::getFinder()->getPaths())) {
ViewFacade::addLocation(sys_get_temp_dir());
<?php $tempDirectory = sys_get_temp_dir();
if (! in_array($tempDirectory, ViewFacade::getFinder()->getPaths())) {
ViewFacade::addLocation(sys_get_temp_dir());
}
$tempFileInfo = pathinfo(tempnam($tempDirectory, 'laravel-blade'));
<?php $this->aliases = $aliases;
$this->namespaces = $namespaces;
$this->blade = $blade ?: new BladeCompiler(new Filesystem, sys_get_temp_dir());
}
<?php #[BeforeClass]
public static function setUpTempDir()
{
self::$tempDir = sys_get_temp_dir().'/tmp';
mkdir(self::$tempDir);
}
<?php if (ini_get('open_basedir') === '') {
$openBaseDir = windows_os() ? explode('\\', __DIR__)[0].'\\'.';'.sys_get_temp_dir() : '/';
$iniSet = ini_set(
'open_basedir',
$openBaseDir
<?php use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
$temp = sys_get_temp_dir();
expect($temp)->toBeDirectory();
});
<?php use PHPUnit\Framework\ExpectationFailedException;
beforeEach(function () {
touch($this->tempFile = sys_get_temp_dir().'/fake.file');
});
afterEach(function () {
<?php use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
expect(sys_get_temp_dir())->toBeReadableDirectory();
});
test('failures', function () {
<?php })->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () {
expect(sys_get_temp_dir())->not->toBeReadableDirectory();
})->throws(ExpectationFailedException::class);
<?php use PHPUnit\Framework\ExpectationFailedException;
beforeEach(function () {
touch($this->tempFile = sys_get_temp_dir().'/fake.file');
});
afterEach(function () {
<?php use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
expect(sys_get_temp_dir())->toBeWritableDirectory();
});
test('failures', function () {
<?php })->throws(ExpectationFailedException::class, 'oh no!');
test('not failures', function () {
expect(sys_get_temp_dir())->not->toBeWritableDirectory();
})->throws(ExpectationFailedException::class);
<?php use PHPUnit\Framework\ExpectationFailedException;
beforeEach(function () {
touch($this->tempFile = sys_get_temp_dir().'/fake.file');
});
afterEach(function () {
<?php use Symfony\Component\Process\Process;
$run = function () {
$junitLogFile = tempnam(sys_get_temp_dir(), 'junit');
$process = new Process(
array_merge(['php', 'bin/pest', '--log-junit', $junitLogFile], func_get_args()),