function DisplayExtenderTest::testDisplayExtendersValidate
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/Plugin/DisplayExtenderTest.php \Drupal\Tests\views\Kernel\Plugin\DisplayExtenderTest::testDisplayExtendersValidate()
- 8.9.x core/modules/views/tests/src/Kernel/Plugin/DisplayExtenderTest.php \Drupal\Tests\views\Kernel\Plugin\DisplayExtenderTest::testDisplayExtendersValidate()
- 10 core/modules/views/tests/src/Kernel/Plugin/DisplayExtenderTest.php \Drupal\Tests\views\Kernel\Plugin\DisplayExtenderTest::testDisplayExtendersValidate()
Tests display extenders validation.
File
-
core/
modules/ views/ tests/ src/ Kernel/ Plugin/ DisplayExtenderTest.php, line 50
Class
- DisplayExtenderTest
- Tests the display extender plugins.
Namespace
Drupal\Tests\views\Kernel\PluginCode
public function testDisplayExtendersValidate() : void {
$this->config('views.settings')
->set('display_extenders', [
'display_extender_test_3',
])
->save();
$view = Views::getView('test_view');
$errors = $view->validate();
foreach ($view->displayHandlers as $id => $display) {
$this->assertArrayHasKey($id, $errors);
$this->assertContains('Display extender test error.', $errors[$id], "Error message found for {$id} display");
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.