/**
* Tests the relationship with the users_field_data table.
*/ publicfunctiontestRelationship(){ $view = Views::getView('dblog_integration_test'); $view->setDisplay('page_1'); // The uid relationship should now join to the {users_field_data} table.
$base_tables = $view->getBaseTables(); $this->assertArrayHasKey('users_field_data', $base_tables); $this->assertArrayNotHasKey('users', $base_tables); $this->assertArrayHasKey('watchdog', $base_tables); }
/**
* Tests views can be filtered by severity and log type.
*/ publicfunctiontestFiltering(){ // Remove the watchdog entries added by the potential batch process.
$this->container->get('database')->truncate('watchdog')->execute();
// Figure out all the base tables allowed based upon what the relationships provide.
$base_tables = $executable->getBaseTables(); $options = Views::viewsDataHelper()->fetchFields(array_keys($base_tables), $type, $display->useGroupBy(), $form_state->get('type'));