function ViewsEntitySchemaSubscriberIntegrationTest::setUp
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php \Drupal\Tests\views\Kernel\EventSubscriber\ViewsEntitySchemaSubscriberIntegrationTest::setUp()
- 10 core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php \Drupal\Tests\views\Kernel\EventSubscriber\ViewsEntitySchemaSubscriberIntegrationTest::setUp()
- 11.x core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php \Drupal\Tests\views\Kernel\EventSubscriber\ViewsEntitySchemaSubscriberIntegrationTest::setUp()
Overrides ViewsKernelTestBase::setUp
File
-
core/
modules/ views/ tests/ src/ Kernel/ EventSubscriber/ ViewsEntitySchemaSubscriberIntegrationTest.php, line 74
Class
- ViewsEntitySchemaSubscriberIntegrationTest
- Tests \Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber
Namespace
Drupal\Tests\views\Kernel\EventSubscriberCode
protected function setUp($import_test_views = TRUE) {
parent::setUp();
$this->eventDispatcher = $this->container
->get('event_dispatcher');
$this->eventSubscriber = $this->container
->get('views.entity_schema_subscriber');
$this->entityDefinitionUpdateManager = $this->container
->get('entity.definition_update_manager');
$this->entityTypeManager = $this->container
->get('entity_type.manager');
$this->state = $this->container
->get('state');
$this->database = $this->container
->get('database');
// Install every entity type's schema that wasn't installed in the parent
// method.
foreach (array_diff_key($this->entityTypeManager
->getDefinitions(), array_flip([
'user',
'entity_test',
])) as $entity_type_id => $entity_type) {
$this->installEntitySchema($entity_type_id);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.