function DisplayTest::testDisplayPluginsAlter
Tests views_ui_views_plugins_display_alter is altering plugin definitions.
File
- 
              core/modules/ views_ui/ tests/ src/ Functional/ DisplayTest.php, line 114 
Class
- DisplayTest
- Tests the display UI.
Namespace
Drupal\Tests\views_ui\FunctionalCode
public function testDisplayPluginsAlter() {
  $definitions = Views::pluginManager('display')->getDefinitions();
  $expected = [
    'route_name' => 'entity.view.edit_form',
    'route_parameters_names' => [
      'view' => 'id',
    ],
  ];
  // Test the expected views_ui array exists on each definition.
  foreach ($definitions as $definition) {
    $this->assertSame($expected, $definition['contextual links']['entity.view.edit_form'], 'Expected views_ui array found in plugin definition.');
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
