You are here

public function FileSystemTempDirectoryTest::testGetTempDirectorySettings in Drupal 9

Same name and namespace in other branches
  1. 8 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()

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());
}