function FileSystemTempDirectoryTest::testGetTempDirectorySettings

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php \Drupal\KernelTests\Core\File\FileSystemTempDirectoryTest::testGetTempDirectorySettings()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php \Drupal\KernelTests\Core\File\FileSystemTempDirectoryTest::testGetTempDirectorySettings()
  3. 10 core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php \Drupal\KernelTests\Core\File\FileSystemTempDirectoryTest::testGetTempDirectorySettings()

Tests 'file_temp_path' setting.

@covers ::getTempDirectory

File

core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php, line 46

Class

FileSystemTempDirectoryTest
Tests for getTempDirectory on FileSystem.

Namespace

Drupal\KernelTests\Core\File

Code

public function testGetTempDirectorySettings() : void {
    $tempDir = '/var/tmp/' . $this->randomMachineName();
    $this->setSetting('file_temp_path', $tempDir);
    $this->assertEquals($tempDir, $this->fileSystem
        ->getTempDirectory());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.