function AreaMessagesTest::testMessageText
Tests the messages area handler.
File
- 
              core/
modules/ views/ tests/ src/ Kernel/ Handler/ AreaMessagesTest.php, line 26  
Class
- AreaMessagesTest
 - Tests the messages area handler.
 
Namespace
Drupal\Tests\views\Kernel\HandlerCode
public function testMessageText() {
  \Drupal::messenger()->addStatus('My drupal set message.');
  $view = Views::getView('test_area_messages');
  $view->setDisplay('default');
  $this->executeView($view);
  $output = $view->render();
  $output = \Drupal::service('renderer')->renderRoot($output);
  $this->setRawContent($output);
  $this->assertText('My drupal set message.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.