function QuickEditFileTest::setUp

Same name in other branches
  1. 9 core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditFileTest.php \Drupal\Tests\quickedit\FunctionalJavascript\QuickEditFileTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/quickedit/tests/src/FunctionalJavascript/QuickEditFileTest.php, line 34

Class

QuickEditFileTest
@group quickedit

Namespace

Drupal\Tests\quickedit\FunctionalJavascript

Code

protected function setUp() {
    parent::setUp();
    // Create the Article node type.
    $this->drupalCreateContentType([
        'type' => 'article',
        'name' => 'Article',
    ]);
    // Add file field to Article node type.
    $this->createFileField('field_file', 'node', 'article', [
        'file_extensions' => 'txt',
    ]);
    // Log in as a content author who can use Quick Edit and edit Articles.
    $user = $this->drupalCreateUser([
        'access contextual links',
        'access toolbar',
        'access in-place editing',
        'access content',
        'create article content',
        'edit any article content',
    ]);
    $this->drupalLogin($user);
}

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