You are here

protected function ViewsBulkEditActionTest::setUp in Views Bulk Edit 8.2

Same name in this branch
  1. 8.2 tests/src/Functional/ViewsBulkEditActionTest.php \Drupal\Tests\views_bulk_edit\Functional\ViewsBulkEditActionTest::setUp()
  2. 8.2 tests/src/Kernel/ViewsBulkEditActionTest.php \Drupal\Tests\views_bulk_edit\Kernel\ViewsBulkEditActionTest::setUp()

Overrides NodeTestBase::setUp

File

tests/src/Functional/ViewsBulkEditActionTest.php, line 42

Class

ViewsBulkEditActionTest
Tests the core edit action.

Namespace

Drupal\Tests\views_bulk_edit\Functional

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp($import_test_views);
  $this
    ->createContentType([
    'type' => 'page',
    'name' => 'Page',
  ]);
  $this
    ->createContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);
  $admin = $this
    ->createUser([
    'bypass node access',
    'access content overview',
    'access content',
    'administer content types',
    'use views bulk edit',
    // Likely a bug in core, NodeAccessControlHandler::checkFieldAccess().
    'administer nodes',
  ]);
  $this
    ->drupalLogin($admin);
}