function DisplayTest::testDisplayPluginsAlter
Same name in other branches
- 9 core/modules/views_ui/tests/src/Functional/DisplayTest.php \Drupal\Tests\views_ui\Functional\DisplayTest::testDisplayPluginsAlter()
- 10 core/modules/views_ui/tests/src/Functional/DisplayTest.php \Drupal\Tests\views_ui\Functional\DisplayTest::testDisplayPluginsAlter()
- 11.x core/modules/views_ui/tests/src/Functional/DisplayTest.php \Drupal\Tests\views_ui\Functional\DisplayTest::testDisplayPluginsAlter()
Tests views_ui_views_plugins_display_alter is altering plugin definitions.
File
-
core/
modules/ views_ui/ tests/ src/ Functional/ DisplayTest.php, line 107
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->assertIdentical($definition['contextual links']['entity.view.edit_form'], $expected, '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.