function FileFieldTestBase::setUp

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

Overrides BrowserTestBase::setUp

7 calls to FileFieldTestBase::setUp()
FileFieldAnonymousSubmissionTest::setUp in core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php
FileFieldAttributesTest::setUp in core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
FileFieldWidgetTest::setUp in core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
FileListingTest::setUp in core/modules/file/tests/src/Functional/FileListingTest.php
FileOnTranslatedEntityTest::setUp in core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php

... See full list

7 methods override FileFieldTestBase::setUp()
FileFieldAnonymousSubmissionTest::setUp in core/modules/file/tests/src/Functional/FileFieldAnonymousSubmissionTest.php
FileFieldAttributesTest::setUp in core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php
FileFieldWidgetTest::setUp in core/modules/file/tests/src/Functional/FileFieldWidgetTest.php
FileListingTest::setUp in core/modules/file/tests/src/Functional/FileListingTest.php
FileOnTranslatedEntityTest::setUp in core/modules/file/tests/src/Functional/FileOnTranslatedEntityTest.php

... See full list

File

core/modules/file/tests/src/Functional/FileFieldTestBase.php, line 47

Class

FileFieldTestBase
Provides methods specifically for testing File module's field handling.

Namespace

Drupal\Tests\file\Functional

Code

protected function setUp() {
    parent::setUp();
    $this->adminUser = $this->drupalCreateUser([
        'access content',
        'access administration pages',
        'administer site configuration',
        'administer users',
        'administer permissions',
        'administer content types',
        'administer node fields',
        'administer node display',
        'administer nodes',
        'bypass node access',
    ]);
    $this->drupalLogin($this->adminUser);
    $this->drupalCreateContentType([
        'type' => 'article',
        'name' => 'Article',
    ]);
}

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