protected function setUpFixtures() { // First install the system module. Many Views have Page displays have menu
// links, and for those to work, the system menus must already be present.
$this->
installConfig(['system'
]);
/** @var \Drupal\Core\State\StateInterface $state */
$state =
$this->container->
get('state'
);
// Define the schema and views data variable before enabling the test module.
$state->
set('views_test_data_schema',
$this->
schemaDefinition());
$state->
set('views_test_data_views_data',
$this->
viewsData());
$this->container->
get('views.views_data'
)->
clear();
$this->
installConfig(['views', 'views_test_config', 'views_test_data'
]);
foreach ($this->
schemaDefinition() as $table =>
$schema) { $this->
installSchema('views_test_data',
$table);
} $this->container->
get('router.builder'
)->
rebuild();
// Load the test dataset.