function DirectoryTest::testFileDirectoryTemp
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php \Drupal\KernelTests\Core\File\DirectoryTest::testFileDirectoryTemp()
- 10 core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php \Drupal\KernelTests\Core\File\DirectoryTest::testFileDirectoryTemp()
- 11.x core/tests/Drupal/KernelTests/Core/File/DirectoryTest.php \Drupal\KernelTests\Core\File\DirectoryTest::testFileDirectoryTemp()
Ensure that the getTempDirectory() method always returns a value.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ File/ DirectoryTest.php, line 194
Class
- DirectoryTest
- Tests operations dealing with directories.
Namespace
Drupal\KernelTests\Core\FileCode
public function testFileDirectoryTemp() {
$tmp_directory = \Drupal::service('file_system')->getTempDirectory();
$this->assertNotEmpty($tmp_directory);
$this->assertEquals($tmp_directory, FileSystem::getOsTemporaryDirectory());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.