class FileSystemRequirementsTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/KernelTests/Core/File/FileSystemRequirementsTest.php \Drupal\KernelTests\Core\File\FileSystemRequirementsTest
@group File
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\KernelTests\Core\File\FileSystemRequirementsTest implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of FileSystemRequirementsTest
File
-
core/
tests/ Drupal/ KernelTests/ Core/ File/ FileSystemRequirementsTest.php, line 10
Namespace
Drupal\KernelTests\Core\FileView source
class FileSystemRequirementsTest extends KernelTestBase {
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [
'system',
];
/**
* {@inheritdoc}
*/
protected $strictConfigSchema = FALSE;
/**
* {@inheritdoc}
*/
protected function setUp() : void {
parent::setUp();
$this->setInstallProfile('standard');
}
/**
* Tests if settings are set, there are not warnings.
*/
public function testSettingsExist() {
$this->setSetting('file_temp_path', $this->randomMachineName());
$requirements = $this->checkSystemRequirements();
$this->assertArrayNotHasKey('temp_directory', $requirements);
}
/**
* Checks system runtime requirements.
*
* @return array
* An array of system requirements.
*/
protected function checkSystemRequirements() {
$this->container
->get('module_handler')
->loadInclude('system', 'install');
return system_requirements('runtime');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.