protected function BulkFormAccessTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php \Drupal\Tests\node\Functional\Views\BulkFormAccessTest::setUp()
- 10 core/modules/node/tests/src/Functional/Views/BulkFormAccessTest.php \Drupal\Tests\node\Functional\Views\BulkFormAccessTest::setUp()
Overrides NodeTestBase::setUp
File
- core/
modules/ node/ tests/ src/ Functional/ Views/ BulkFormAccessTest.php, line 49
Class
- BulkFormAccessTest
- Tests if entity access is respected on a node bulk operations form.
Namespace
Drupal\Tests\node\Functional\ViewsCode
protected function setUp($import_test_views = TRUE) {
parent::setUp($import_test_views);
// Create Article node type.
$this
->drupalCreateContentType([
'type' => 'article',
'name' => 'Article',
]);
$this->accessHandler = \Drupal::entityTypeManager()
->getAccessControlHandler('node');
node_access_test_add_field(NodeType::load('article'));
// After enabling a node access module, the access table has to be rebuild.
node_access_rebuild();
// Enable the private node feature of the node_access_test module.
\Drupal::state()
->set('node_access_test.private', TRUE);
}