protected function BulkFormAccessTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Tests/Views/BulkFormAccessTest.php \Drupal\node\Tests\Views\BulkFormAccessTest::setUp()
Sets up a Drupal site for running functional and integration tests.
Installs Drupal with the installation profile specified in \Drupal\simpletest\WebTestBase::$profile into the prefixed database.
Afterwards, installs any additional modules specified in the static \Drupal\simpletest\WebTestBase::$modules property of each class in the class hierarchy.
After installation all caches are flushed and several configuration values are reset to the values of the parent site executing the test, since the default values may be incompatible with the environment in which tests are being executed.
Overrides NodeTestBase::setUp
File
- core/
modules/ node/ src/ Tests/ Views/ BulkFormAccessTest.php, line 49 - Contains \Drupal\node\Tests\Views\BulkFormAccessTest.
Class
- BulkFormAccessTest
- Tests if entity access is respected on a node bulk operations form.
Namespace
Drupal\node\Tests\ViewsCode
protected function setUp() {
parent::setUp();
// Create Article node type.
$this
->drupalCreateContentType(array(
'type' => 'article',
'name' => 'Article',
));
$this->accessHandler = \Drupal::entityManager()
->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);
}