Update to Drupal 8.0.1. For more information, see https://www.drupal.org/node/2627402
This commit is contained in:
parent
013aaaf2ff
commit
1a0e9d9fac
153 changed files with 1268 additions and 670 deletions
|
@ -0,0 +1,71 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: test_field_header
|
||||
label: null
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: views_test_data
|
||||
base_field: nid
|
||||
core: '8'
|
||||
display:
|
||||
default:
|
||||
display_options:
|
||||
fields:
|
||||
name:
|
||||
id: name
|
||||
table: views_test_data
|
||||
field: name
|
||||
plugin_id: string
|
||||
element_label_type: h2
|
||||
style:
|
||||
type: table
|
||||
display_extenders: { }
|
||||
display_plugin: default
|
||||
display_title: Master
|
||||
id: default
|
||||
position: 0
|
||||
cache_metadata:
|
||||
max-age: 0
|
||||
contexts:
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
tags: { }
|
||||
page_1:
|
||||
display_options:
|
||||
path: test_field_header
|
||||
display_extenders: { }
|
||||
display_plugin: page
|
||||
display_title: Page
|
||||
id: page_1
|
||||
position: 1
|
||||
cache_metadata:
|
||||
max-age: 0
|
||||
contexts:
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
tags: { }
|
||||
page_2:
|
||||
display_options:
|
||||
path: test_field_header_xss
|
||||
defaults:
|
||||
fields: false
|
||||
fields:
|
||||
name:
|
||||
id: name
|
||||
table: views_test_data
|
||||
field: name
|
||||
plugin_id: string
|
||||
element_label_type: 'script>alert("XSS")</script'
|
||||
display_extenders: { }
|
||||
display_plugin: page
|
||||
display_title: 'Page 2'
|
||||
id: page_2
|
||||
position: 2
|
||||
cache_metadata:
|
||||
max-age: 0
|
||||
contexts:
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
tags: { }
|
|
@ -258,6 +258,23 @@ class FieldPluginBaseTest extends UnitTestCase {
|
|||
$this->assertEquals($expected_result, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the "No results text" rendering.
|
||||
*
|
||||
* @covers ::renderText
|
||||
*/
|
||||
public function testRenderNoResult() {
|
||||
$this->setupDisplayWithEmptyArgumentsAndFields();
|
||||
$field = $this->setupTestField(['empty' => 'This <strong>should work</strong>.']);
|
||||
$field->field_alias = 'key';
|
||||
$row = new ResultRow(['key' => '']);
|
||||
|
||||
$expected_result = 'This <strong>should work</strong>.';
|
||||
$result = $field->advancedRender($row);
|
||||
$this->assertEquals($expected_result, $result);
|
||||
$this->assertInstanceOf('\Drupal\views\Render\ViewsRenderPipelineMarkup', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test rendering of a link with a path and options.
|
||||
*
|
||||
|
|
Reference in a new issue