Neos\Flow\Utility\Environment::setTemporaryDirectoryBase PHP Method

setTemporaryDirectoryBase() public method

Sets the base path of the temporary directory
public setTemporaryDirectoryBase ( string $temporaryDirectoryBase ) : void
$temporaryDirectoryBase string Base path of the temporary directory, with trailing slash
return void
    public function setTemporaryDirectoryBase($temporaryDirectoryBase)
    {
        $this->temporaryDirectoryBase = $temporaryDirectoryBase;
        $this->temporaryDirectory = null;
    }

Usage Example

 /**
  * @test
  */
 public function getPathToTemporaryDirectoryReturnsAnExistingPath()
 {
     $environment = new Environment(new ApplicationContext('Testing'));
     $environment->setTemporaryDirectoryBase(Files::concatenatePaths([sys_get_temp_dir(), 'FlowEnvironmentTest']));
     $path = $environment->getPathToTemporaryDirectory();
     $this->assertTrue(file_exists($path), 'The temporary path does not exist.');
 }
All Usage Examples Of Neos\Flow\Utility\Environment::setTemporaryDirectoryBase