function FileSystemTempDirectoryTest::testGetTempDirectorySettings

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php \Drupal\KernelTests\Core\File\FileSystemTempDirectoryTest::testGetTempDirectorySettings()
  2. 10 core/tests/Drupal/KernelTests/Core/File/FileSystemTempDirectoryTest.php \Drupal\KernelTests\Core\File\FileSystemTempDirectoryTest::testGetTempDirectorySettings()
  3. 11.x 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 47

Class

FileSystemTempDirectoryTest
Tests for getTempDirectory on FileSystem.

Namespace

Drupal\KernelTests\Core\File

Code

public function testGetTempDirectorySettings() {
    $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.