Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -196,6 +196,7 @@ display:
|
|||
value:
|
||||
fr: fr
|
||||
es: es
|
||||
und: und
|
||||
group: 1
|
||||
exposed: false
|
||||
expose:
|
||||
|
|
|
@ -52,6 +52,15 @@ display:
|
|||
plugin_id: node_nid
|
||||
entity_type: node
|
||||
entity_field: nid
|
||||
sorts:
|
||||
vid:
|
||||
id: vid
|
||||
table: node_field_revision
|
||||
field: vid
|
||||
order: ASC
|
||||
plugin_id: field
|
||||
entity_type: node
|
||||
entity_field: vid
|
||||
display_plugin: default
|
||||
display_title: Master
|
||||
id: default
|
||||
|
|
|
@ -0,0 +1,194 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.node.body
|
||||
module:
|
||||
- node
|
||||
- text
|
||||
- user
|
||||
id: test_node_tokens
|
||||
label: test_node_tokens
|
||||
module: views
|
||||
description: 'Verifies tokens provided by the Node module are replaced correctly.'
|
||||
tag: ''
|
||||
base_table: node_field_data
|
||||
base_field: nid
|
||||
core: 8.x
|
||||
display:
|
||||
default:
|
||||
display_plugin: default
|
||||
id: default
|
||||
display_title: Master
|
||||
position: 0
|
||||
display_options:
|
||||
access:
|
||||
type: perm
|
||||
options:
|
||||
perm: 'access content'
|
||||
cache:
|
||||
type: tag
|
||||
options: { }
|
||||
query:
|
||||
type: views_query
|
||||
options:
|
||||
disable_sql_rewrite: false
|
||||
distinct: false
|
||||
replica: false
|
||||
query_comment: ''
|
||||
query_tags: { }
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Apply
|
||||
reset_button: false
|
||||
reset_button_label: Reset
|
||||
exposed_sorts_label: 'Sort by'
|
||||
expose_sort_order: true
|
||||
sort_asc_label: Asc
|
||||
sort_desc_label: Desc
|
||||
pager:
|
||||
type: full
|
||||
options:
|
||||
items_per_page: 10
|
||||
offset: 0
|
||||
id: 0
|
||||
total_pages: null
|
||||
expose:
|
||||
items_per_page: false
|
||||
items_per_page_label: 'Items per page'
|
||||
items_per_page_options: '5, 10, 25, 50'
|
||||
items_per_page_options_all: false
|
||||
items_per_page_options_all_label: '- All -'
|
||||
offset: false
|
||||
offset_label: Offset
|
||||
tags:
|
||||
previous: '‹ previous'
|
||||
next: 'next ›'
|
||||
first: '« first'
|
||||
last: 'last »'
|
||||
quantity: 9
|
||||
style:
|
||||
type: default
|
||||
options:
|
||||
grouping: { }
|
||||
row_class: ''
|
||||
default_row_class: true
|
||||
uses_fields: false
|
||||
row:
|
||||
type: fields
|
||||
options:
|
||||
inline: { }
|
||||
separator: ''
|
||||
hide_empty: false
|
||||
default_field_elements: true
|
||||
fields:
|
||||
body:
|
||||
id: body
|
||||
table: node__body
|
||||
field: body
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: true
|
||||
text: "Body: {{ body }}<br />\nRaw value: {{ body__value }}<br />\nRaw summary: {{ body__summary }}<br />\nRaw format: {{ body__format }}"
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: false
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: text_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
plugin_id: field
|
||||
filters: { }
|
||||
sorts:
|
||||
created:
|
||||
id: created
|
||||
table: node_field_data
|
||||
field: created
|
||||
order: DESC
|
||||
entity_type: node
|
||||
entity_field: created
|
||||
plugin_id: date
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
exposed: false
|
||||
expose:
|
||||
label: ''
|
||||
granularity: second
|
||||
header: { }
|
||||
footer: { }
|
||||
empty: { }
|
||||
relationships: { }
|
||||
arguments: { }
|
||||
display_extenders: { }
|
||||
cache_metadata:
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
cacheable: false
|
||||
page_1:
|
||||
display_plugin: page
|
||||
id: page_1
|
||||
display_title: Page
|
||||
position: 1
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: test_node_tokens
|
||||
cache_metadata:
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- 'user.node_grants:view'
|
||||
- user.permissions
|
||||
cacheable: false
|
|
@ -21,8 +21,6 @@ class NodeByNodeTypeTest extends MigrateSqlSourceTestCase {
|
|||
// The fake Migration configuration entity.
|
||||
protected $migrationConfiguration = array(
|
||||
'id' => 'test',
|
||||
// Leave it empty for now.
|
||||
'idlist' => array(),
|
||||
// The fake configuration for the source.
|
||||
'source' => array(
|
||||
'plugin' => 'd6_node',
|
||||
|
|
|
@ -21,8 +21,6 @@ class NodeRevisionByNodeTypeTest extends MigrateSqlSourceTestCase {
|
|||
// The fake Migration configuration entity.
|
||||
protected $migrationConfiguration = [
|
||||
'id' => 'test',
|
||||
// Leave it empty for now.
|
||||
'idlist' => [],
|
||||
// The fake configuration for the source.
|
||||
'source' => [
|
||||
'plugin' => 'd6_node_revision',
|
||||
|
|
|
@ -21,8 +21,6 @@ class NodeRevisionTest extends MigrateSqlSourceTestCase {
|
|||
// The fake Migration configuration entity.
|
||||
protected $migrationConfiguration = [
|
||||
'id' => 'test',
|
||||
// Leave it empty for now.
|
||||
'idlist' => [],
|
||||
// The fake configuration for the source.
|
||||
'source' => [
|
||||
'plugin' => 'd6_node_revision',
|
||||
|
|
|
@ -18,12 +18,8 @@ class NodeTest extends MigrateSqlSourceTestCase {
|
|||
|
||||
const PLUGIN_CLASS = 'Drupal\node\Plugin\migrate\source\d6\Node';
|
||||
|
||||
// The fake Migration configuration entity.
|
||||
protected $migrationConfiguration = array(
|
||||
'id' => 'test',
|
||||
// Leave it empty for now.
|
||||
'idlist' => array(),
|
||||
// The fake configuration for the source.
|
||||
'source' => array(
|
||||
'plugin' => 'd6_node',
|
||||
),
|
||||
|
@ -79,10 +75,9 @@ class NodeTest extends MigrateSqlSourceTestCase {
|
|||
'format' => 1,
|
||||
),
|
||||
array(
|
||||
// Node fields.
|
||||
'nid' => 5,
|
||||
'vid' => 5,
|
||||
'type' => 'article',
|
||||
'type' => 'story',
|
||||
'language' => 'en',
|
||||
'title' => 'node title 5',
|
||||
'uid' => 1,
|
||||
|
@ -101,6 +96,9 @@ class NodeTest extends MigrateSqlSourceTestCase {
|
|||
'log' => '',
|
||||
'timestamp' => 1279308993,
|
||||
'format' => 1,
|
||||
'field_test_four' => array(
|
||||
array('value' => '3.14159'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -108,6 +106,50 @@ class NodeTest extends MigrateSqlSourceTestCase {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
$this->databaseContents['content_node_field'] = array(
|
||||
array(
|
||||
'field_name' => 'field_test_four',
|
||||
'type' => 'number_float',
|
||||
'global_settings' => 'a:0:{}',
|
||||
'required' => '0',
|
||||
'multiple' => '0',
|
||||
'db_storage' => '1',
|
||||
'module' => 'number',
|
||||
'db_columns' => 'a:1:{s:5:"value";a:3:{s:4:"type";s:5:"float";s:8:"not null";b:0;s:8:"sortable";b:1;}}',
|
||||
'active' => '1',
|
||||
'locked' => '0',
|
||||
),
|
||||
);
|
||||
$this->databaseContents['content_node_field_instance'] = array(
|
||||
array(
|
||||
'field_name' => 'field_test_four',
|
||||
'type_name' => 'story',
|
||||
'weight' => '3',
|
||||
'label' => 'Float Field',
|
||||
'widget_type' => 'number',
|
||||
'widget_settings' => 'a:0:{}',
|
||||
'display_settings' => 'a:0:{}',
|
||||
'description' => 'An example float field.',
|
||||
'widget_module' => 'number',
|
||||
'widget_active' => '1',
|
||||
),
|
||||
);
|
||||
$this->databaseContents['content_type_story'] = array(
|
||||
array(
|
||||
'nid' => 5,
|
||||
'vid' => 5,
|
||||
'uid' => 5,
|
||||
'field_test_four_value' => '3.14159',
|
||||
),
|
||||
);
|
||||
$this->databaseContents['system'] = array(
|
||||
array(
|
||||
'type' => 'module',
|
||||
'name' => 'content',
|
||||
'schema_version' => 6001,
|
||||
'status' => TRUE,
|
||||
),
|
||||
);
|
||||
foreach ($this->expectedResults as $k => $row) {
|
||||
foreach (array('nid', 'vid', 'title', 'uid', 'body', 'teaser', 'format', 'timestamp', 'log') as $field) {
|
||||
$this->databaseContents['node_revisions'][$k][$field] = $row[$field];
|
||||
|
|
|
@ -24,8 +24,6 @@ class NodeTypeTest extends MigrateSqlSourceTestCase {
|
|||
protected $migrationConfiguration = array(
|
||||
// The ID of the entity, can be any string.
|
||||
'id' => 'test_nodetypes',
|
||||
// Leave it empty for now.
|
||||
'idlist' => array(),
|
||||
'source' => array(
|
||||
'plugin' => 'd6_nodetype',
|
||||
),
|
||||
|
|
|
@ -24,8 +24,6 @@ class ViewModeTest extends MigrateSqlSourceTestCase {
|
|||
protected $migrationConfiguration = array(
|
||||
// The ID of the entity, can be any string.
|
||||
'id' => 'view_mode_test',
|
||||
// Leave it empty for now.
|
||||
'idlist' => array(),
|
||||
'source' => array(
|
||||
'plugin' => 'd6_field_instance_view_mode',
|
||||
),
|
||||
|
|
|
@ -0,0 +1,152 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\node\Unit\Plugin\migrate\source\d7\NodeTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\node\Unit\Plugin\migrate\source\d7;
|
||||
|
||||
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
|
||||
|
||||
/**
|
||||
* Tests D7 node source plugin.
|
||||
*
|
||||
* @group node
|
||||
*/
|
||||
class NodeTest extends MigrateSqlSourceTestCase {
|
||||
|
||||
const PLUGIN_CLASS = 'Drupal\node\Plugin\migrate\source\d7\Node';
|
||||
|
||||
protected $migrationConfiguration = array(
|
||||
'id' => 'test',
|
||||
'source' => array(
|
||||
'plugin' => 'd7_node',
|
||||
),
|
||||
);
|
||||
|
||||
protected $expectedResults = array(
|
||||
array(
|
||||
// Node fields.
|
||||
'nid' => 1,
|
||||
'vid' => 1,
|
||||
'type' => 'page',
|
||||
'language' => 'en',
|
||||
'title' => 'node title 1',
|
||||
'uid' => 1,
|
||||
'status' => 1,
|
||||
'created' => 1279051598,
|
||||
'changed' => 1279051598,
|
||||
'comment' => 2,
|
||||
'promote' => 1,
|
||||
'sticky' => 0,
|
||||
'tnid' => 0,
|
||||
'translate' => 0,
|
||||
'log' => '',
|
||||
'timestamp' => 1279051598,
|
||||
),
|
||||
array(
|
||||
// Node fields.
|
||||
'nid' => 2,
|
||||
'vid' => 2,
|
||||
'type' => 'page',
|
||||
'language' => 'en',
|
||||
'title' => 'node title 2',
|
||||
'uid' => 1,
|
||||
'status' => 1,
|
||||
'created' => 1279290908,
|
||||
'changed' => 1279308993,
|
||||
'comment' => 0,
|
||||
'promote' => 1,
|
||||
'sticky' => 0,
|
||||
'tnid' => 0,
|
||||
'translate' => 0,
|
||||
'log' => '',
|
||||
'timestamp' => 1279308993,
|
||||
),
|
||||
array(
|
||||
// Node fields.
|
||||
'nid' => 5,
|
||||
'vid' => 5,
|
||||
'type' => 'article',
|
||||
'language' => 'en',
|
||||
'title' => 'node title 5',
|
||||
'uid' => 1,
|
||||
'status' => 1,
|
||||
'created' => 1279290908,
|
||||
'changed' => 1279308993,
|
||||
'comment' => 0,
|
||||
'promote' => 1,
|
||||
'sticky' => 0,
|
||||
'tnid' => 0,
|
||||
'translate' => 0,
|
||||
'log' => '',
|
||||
'timestamp' => 1279308993,
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
foreach ($this->expectedResults as $k => $row) {
|
||||
foreach (array('nid', 'vid', 'title', 'uid', 'timestamp', 'log') as $field) {
|
||||
$this->databaseContents['node_revision'][$k][$field] = $row[$field];
|
||||
switch ($field) {
|
||||
case 'nid': case 'vid':
|
||||
break;
|
||||
case 'uid':
|
||||
$this->databaseContents['node_revision'][$k]['uid']++;
|
||||
break;
|
||||
default:
|
||||
unset($row[$field]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->databaseContents['node'][$k] = $row;
|
||||
}
|
||||
array_walk($this->expectedResults, function (&$row) {
|
||||
$row['node_uid'] = $row['uid'];
|
||||
$row['revision_uid'] = $row['uid'] + 1;
|
||||
unset($row['uid']);
|
||||
});
|
||||
|
||||
$this->databaseContents['field_config_instance'] = array(
|
||||
array(
|
||||
'id' => '2',
|
||||
'field_id' => '2',
|
||||
'field_name' => 'body',
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'page',
|
||||
'data' => 'a:0:{}',
|
||||
'deleted' => '0',
|
||||
),
|
||||
array(
|
||||
'id' => '2',
|
||||
'field_id' => '2',
|
||||
'field_name' => 'body',
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'article',
|
||||
'data' => 'a:0:{}',
|
||||
'deleted' => '0',
|
||||
),
|
||||
);
|
||||
$this->databaseContents['field_revision_body'] = array(
|
||||
array(
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'page',
|
||||
'deleted' => '0',
|
||||
'entity_id' => '1',
|
||||
'revision_id' => '1',
|
||||
'language' => 'en',
|
||||
'delta' => '0',
|
||||
'body_value' => 'Foobaz',
|
||||
'body_summary' => '',
|
||||
'body_format' => 'filtered_html',
|
||||
),
|
||||
);
|
||||
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\node\Unit\Plugin\migrate\source\d7\NodeTypeTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\node\Unit\Plugin\migrate\source\d7;
|
||||
|
||||
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
|
||||
|
||||
/**
|
||||
* Tests D7 node type source plugin.
|
||||
*
|
||||
* @group node
|
||||
*/
|
||||
class NodeTypeTest extends MigrateSqlSourceTestCase {
|
||||
|
||||
const PLUGIN_CLASS = 'Drupal\node\Plugin\migrate\source\d7\NodeType';
|
||||
|
||||
protected $migrationConfiguration = array(
|
||||
'id' => 'test_nodetypes',
|
||||
'source' => array(
|
||||
'plugin' => 'd7_node_type',
|
||||
),
|
||||
);
|
||||
|
||||
protected $expectedResults = array(
|
||||
array(
|
||||
'type' => 'page',
|
||||
'name' => 'Page',
|
||||
'base' => 'node',
|
||||
'description' => 'A <em>page</em>, similar in form to a <em>story</em>, is a simple method for creating and displaying information that rarely changes, such as an "About us" section of a website. By default, a <em>page</em> entry does not allow visitor comments and is not featured on the site\'s initial home page.',
|
||||
'help' => '',
|
||||
'title_label' => 'Title',
|
||||
'custom' => 1,
|
||||
'modified' => 0,
|
||||
'locked' => 0,
|
||||
'disabled' => 0,
|
||||
'orig_type' => 'page',
|
||||
),
|
||||
array(
|
||||
'type' => 'story',
|
||||
'name' => 'Story',
|
||||
'base' => 'node',
|
||||
'description' => 'A <em>story</em>, similar in form to a <em>page</em>, is ideal for creating and displaying content that informs or engages website visitors. Press releases, site announcements, and informal blog-like entries may all be created with a <em>story</em> entry. By default, a <em>story</em> entry is automatically featured on the site\'s initial home page, and provides the ability to post comments.',
|
||||
'help' => '',
|
||||
'title_label' => 'Title',
|
||||
'custom' => 1,
|
||||
'modified' => 0,
|
||||
'locked' => 0,
|
||||
'disabled' => 0,
|
||||
'orig_type' => 'story',
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
* Prepopulate contents with results.
|
||||
*/
|
||||
protected function setUp() {
|
||||
$this->databaseContents['node_type'] = $this->expectedResults;
|
||||
$this->databaseContents['variable'] = array(
|
||||
array(
|
||||
'name' => 'node_options_page',
|
||||
'value' => 'a:1:{i:0;s:6:"status";}',
|
||||
),
|
||||
array(
|
||||
'name' => 'node_options_story',
|
||||
'value' => 'a:1:{i:0;s:6:"status";}',
|
||||
),
|
||||
);
|
||||
$this->databaseContents['field_config_instance'] = array(
|
||||
array(
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'page',
|
||||
'field_name' => 'body',
|
||||
'data' => 'a:1:{s:5:"label";s:4:"Body";}',
|
||||
),
|
||||
array(
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'story',
|
||||
'field_name' => 'body',
|
||||
'data' => 'a:1:{s:5:"label";s:4:"Body";}',
|
||||
)
|
||||
);
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue