function 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.