protected function FilePrivateTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/modules/file/tests/src/Functional/FilePrivateTest.php \Drupal\Tests\file\Functional\FilePrivateTest::setUp()
- 9 core/modules/file/tests/src/Functional/FilePrivateTest.php \Drupal\Tests\file\Functional\FilePrivateTest::setUp()
File
- core/
modules/ file/ tests/ src/ Functional/ FilePrivateTest.php, line 28
Class
- FilePrivateTest
- Uploads a test to a private node and checks access.
Namespace
Drupal\Tests\file\FunctionalCode
protected function setUp() : void {
parent::setUp();
node_access_test_add_field(NodeType::load('article'));
node_access_rebuild();
\Drupal::state()
->set('node_access_test.private', TRUE);
// This test expects unused managed files to be marked as a temporary file.
$this
->config('file.settings')
->set('make_unused_managed_files_temporary', TRUE)
->save();
}