function FilePrivateTest::setUp
Same name in other branches
- 9 core/modules/file/tests/src/Functional/FilePrivateTest.php \Drupal\Tests\file\Functional\FilePrivateTest::setUp()
- 8.9.x core/modules/file/tests/src/Functional/FilePrivateTest.php \Drupal\Tests\file\Functional\FilePrivateTest::setUp()
- 10 core/modules/file/tests/src/Functional/FilePrivateTest.php \Drupal\Tests\file\Functional\FilePrivateTest::setUp()
Overrides FileFieldTestBase::setUp
File
-
core/
modules/ file/ tests/ src/ Functional/ FilePrivateTest.php, line 31
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.