You are here

protected function FormErrorHandlerQuickEditTest::setUp in Drupal 8

Overrides BrowserTestBase::setUp

File

core/modules/inline_form_errors/tests/src/FunctionalJavascript/FormErrorHandlerQuickEditTest.php, line 41

Class

FormErrorHandlerQuickEditTest
Tests Inline Form Errors compatibility with Quick Edit.

Namespace

Drupal\Tests\inline_form_errors\FunctionalJavascript

Code

protected function setUp() {
  parent::setUp();

  // Create a page node type for testing.
  NodeType::create([
    'type' => 'page',
    'name' => 'page',
  ])
    ->save();

  // Create a user with the permission to use in-place editing.
  $permissions = [
    'access content',
    'create page content',
    'edit any page content',
    'access contextual links',
    'access in-place editing',
  ];
  $this->editorUser = $this
    ->drupalCreateUser($permissions);
  $this
    ->drupalLogin($this->editorUser);
}