function FileFieldAnonymousSubmissionTest::setUp

Same name in other branches
  1. 9 core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php \Drupal\Tests\file\Functional\FileFieldAnonymousSubmissionTest::setUp()
  2. 10 core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php \Drupal\Tests\file\Functional\FileFieldAnonymousSubmissionTest::setUp()
  3. 11.x core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php \Drupal\Tests\file\Functional\FileFieldAnonymousSubmissionTest::setUp()

Overrides FileFieldTestBase::setUp

File

core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php, line 24

Class

FileFieldAnonymousSubmissionTest
Confirm that file field submissions work correctly for anonymous visitors.

Namespace

Drupal\Tests\file\Functional

Code

protected function setUp() {
    parent::setUp();
    // Set up permissions for anonymous attacker user.
    user_role_change_permissions(RoleInterface::ANONYMOUS_ID, [
        'create article content' => TRUE,
        'access content' => TRUE,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.