Commit fa9d7124 authored by alexpott's avatar alexpott

Issue #2624890 by Lendude: Views Messages area handler gives broken/missing...

Issue #2624890 by Lendude: Views Messages area handler gives broken/missing handler when added to a view
parent 1168a235
......@@ -12,7 +12,7 @@
*
* @ingroup views_area_handlers
*
* @PluginID("messages")
* @ViewsArea("messages")
*/
class Messages extends AreaPluginBase {
......
<?php
/**
* @file
* Contains \Drupal\views\Tests\Handler\AreaMessagesTest.
*/
namespace Drupal\views\Tests\Handler;
use Drupal\views\Tests\ViewKernelTestBase;
use Drupal\views\Views;
/**
* Tests the messages area handler.
*
* @group views
* @see \Drupal\views\Plugin\views\area\Messages
*/
class AreaMessagesTest extends ViewKernelTestBase {
/**
* Views used by this test.
*
* @var array
*/
public static $testViews = array('test_area_messages');
/**
* Tests the messages area handler.
*/
public function testMessageText() {
drupal_set_message('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.');
}
}
langcode: en
status: true
dependencies: { }
id: test_area_messages
label: ''
module: views
description: ''
tag: ''
base_table: views_test_data
base_field: nid
core: '8'
display:
default:
display_options:
defaults:
fields: false
pager: false
sorts: false
fields:
id:
field: id
id: id
relationship: none
table: views_test_data
plugin_id: numeric
pager:
options:
offset: 0
type: none
sorts:
id:
field: id
id: id
order: ASC
relationship: none
table: views_test_data
plugin_id: numeric
empty:
title:
field: title
id: title
table: views
plugin_id: title
title: test_title_empty
header:
messages:
id: messages
table: views
field: messages
relationship: none
group_type: group
admin_label: ''
empty: true
plugin_id: messages
display_plugin: default
display_title: Master
id: default
position: 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment