Skip to content
Snippets Groups Projects
Verified Commit ba77d3f4 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

Issue #3116841 by quietone, swatichouhan012, dww, mikelutz: Correct latest...

Issue #3116841 by quietone, swatichouhan012, dww, mikelutz: Correct latest revision for node 1 in drupal6 test fixture
parent 33a6866d
No related branches found
No related tags found
No related merge requests found
......@@ -2274,6 +2274,20 @@
'field_image_list' => '1',
'field_image_data' => 'a:2:{s:3:"alt";s:0:"";s:5:"title";s:0:"";}',
))
->values(array(
'vid' => '5',
'nid' => '1',
'field_image_fid' => '2',
'field_image_list' => '1',
'field_image_data' => 'a:2:{s:3:"alt";s:0:"";s:5:"title";s:0:"";}',
))
->values(array(
'vid' => '2001',
'nid' => '1',
'field_image_fid' => '2',
'field_image_list' => '1',
'field_image_data' => 'a:2:{s:3:"alt";s:0:"";s:5:"title";s:0:"";}',
))
->execute();
$connection->schema()->createTable('content_field_multivalue', array(
'fields' => array(
......@@ -2389,12 +2403,6 @@
'field_test_value' => 'This is a shared text field',
'field_test_format' => '1',
))
->values(array(
'vid' => '2',
'nid' => '1',
'field_test_value' => 'This is a shared text field',
'field_test_format' => '1',
))
->values(array(
'vid' => '3',
'nid' => '2',
......@@ -2403,9 +2411,9 @@
))
->values(array(
'vid' => '5',
'nid' => '2',
'field_test_value' => NULL,
'field_test_format' => NULL,
'nid' => '1',
'field_test_value' => 'This is a shared text field',
'field_test_format' => '1',
))
->values(array(
'vid' => '12',
......@@ -2413,6 +2421,12 @@
'field_test_value' => 'text for default value',
'field_test_format' => '1',
))
->values(array(
'vid' => '2001',
'nid' => '1',
'field_test_value' => 'This is a shared text field',
'field_test_format' => '1',
))
->execute();
$connection->schema()->createTable('content_field_test_text_single_checkbox', array(
'fields' => array(
......@@ -2470,14 +2484,19 @@
))
->values(array(
'vid' => '5',
'nid' => '2',
'field_test_text_single_checkbox_value' => NULL,
'nid' => '1',
'field_test_text_single_checkbox_value' => '0',
))
->values(array(
'vid' => '12',
'nid' => '9',
'field_test_text_single_checkbox_value' => '0',
))
->values(array(
'vid' => '2001',
'nid' => '1',
'field_test_text_single_checkbox_value' => '0',
))
->execute();
$connection->schema()->createTable('content_field_test_two', array(
'fields' => array(
......@@ -2534,10 +2553,10 @@
'field_test_two_value' => '10',
))
->values(array(
'vid' => '2',
'vid' => '1',
'nid' => '1',
'delta' => '0',
'field_test_two_value' => NULL,
'delta' => '1',
'field_test_two_value' => '20',
))
->values(array(
'vid' => '3',
......@@ -2547,9 +2566,15 @@
))
->values(array(
'vid' => '5',
'nid' => '2',
'nid' => '1',
'delta' => '0',
'field_test_two_value' => NULL,
'field_test_two_value' => '10',
))
->values(array(
'vid' => '5',
'nid' => '1',
'delta' => '1',
'field_test_two_value' => '20',
))
->values(array(
'vid' => '12',
......@@ -2558,7 +2583,13 @@
'field_test_two_value' => NULL,
))
->values(array(
'vid' => '1',
'vid' => '2001',
'nid' => '1',
'delta' => '0',
'field_test_two_value' => '10',
))
->values(array(
'vid' => '2001',
'nid' => '1',
'delta' => '1',
'field_test_two_value' => '20',
......@@ -3939,38 +3970,6 @@
'field_test_datetime_value2' => NULL,
'field_test_string_selectlist_value' => NULL,
))
->values(array(
'nid' => '1',
'vid' => '2',
'uid' => '1',
'field_test_three_value' => '42.42',
'field_test_identical1_value' => '1',
'field_test_identical2_value' => '1',
'field_test_link_url' => 'https://www.drupal.org/project/drupal',
'field_test_link_title' => 'Drupal project page',
'field_test_link_attributes' => 's:32:"a:1:{s:6:"target";s:6:"_blank";}";',
'field_test_date_value' => '2013-01-02T04:05:00',
'field_test_datestamp_value' => '1391357160',
'field_test_datetime_value' => '2015-03-04 06:07:00',
'field_test_email_email' => 'PrincessRuwenne@example.com',
'field_test_filefield_fid' => NULL,
'field_test_filefield_list' => NULL,
'field_test_filefield_data' => NULL,
'field_test_four_value' => NULL,
'field_test_integer_selectlist_value' => NULL,
'field_test_float_single_checkbox_value' => NULL,
'field_test_decimal_radio_buttons_value' => NULL,
'field_test_phone_value' => NULL,
'field_test_exclude_unset_value' => NULL,
'field_test_exclude_unset_format' => NULL,
'field_test_imagefield_fid' => NULL,
'field_test_imagefield_list' => NULL,
'field_test_imagefield_data' => NULL,
'field_test_text_single_checkbox2_value' => NULL,
'field_test_datestamp_value2' => NULL,
'field_test_datetime_value2' => NULL,
'field_test_string_selectlist_value' => NULL,
))
->values(array(
'nid' => '2',
'vid' => '3',
......@@ -4004,33 +4003,33 @@
'field_test_string_selectlist_value' => NULL,
))
->values(array(
'nid' => '2',
'nid' => '1',
'vid' => '5',
'uid' => '1',
'field_test_three_value' => '23.20',
'field_test_three_value' => '42.42',
'field_test_identical1_value' => '1',
'field_test_identical2_value' => '1',
'field_test_link_url' => 'http://groups.drupal.org/',
'field_test_link_title' => 'Drupal Groups',
'field_test_link_attributes' => 's:6:"a:0:{}";',
'field_test_date_value' => NULL,
'field_test_datestamp_value' => NULL,
'field_test_datetime_value' => NULL,
'field_test_email_email' => NULL,
'field_test_filefield_fid' => NULL,
'field_test_filefield_list' => NULL,
'field_test_filefield_data' => NULL,
'field_test_link_url' => 'https://www.drupal.org/project/drupal',
'field_test_link_title' => 'Drupal project page',
'field_test_link_attributes' => 's:32:"a:1:{s:6:"target";s:6:"_blank";}";',
'field_test_date_value' => '2013-01-02T04:05:00',
'field_test_datestamp_value' => '1391357160',
'field_test_datetime_value' => '2015-03-04 06:07:00',
'field_test_email_email' => 'PrincessRuwenne@example.com',
'field_test_filefield_fid' => '5',
'field_test_filefield_list' => '1',
'field_test_filefield_data' => 'a:1:{s:11:"description";s:4:"desc";}',
'field_test_four_value' => NULL,
'field_test_integer_selectlist_value' => NULL,
'field_test_float_single_checkbox_value' => NULL,
'field_test_integer_selectlist_value' => '3412',
'field_test_float_single_checkbox_value' => '3',
'field_test_decimal_radio_buttons_value' => NULL,
'field_test_phone_value' => NULL,
'field_test_exclude_unset_value' => NULL,
'field_test_exclude_unset_format' => NULL,
'field_test_exclude_unset_value' => 'This is a field with exclude unset.',
'field_test_exclude_unset_format' => '1',
'field_test_imagefield_fid' => NULL,
'field_test_imagefield_list' => NULL,
'field_test_imagefield_data' => NULL,
'field_test_text_single_checkbox2_value' => NULL,
'field_test_text_single_checkbox2_value' => 'Hello',
'field_test_datestamp_value2' => NULL,
'field_test_datetime_value2' => NULL,
'field_test_string_selectlist_value' => NULL,
......@@ -4067,6 +4066,38 @@
'field_test_datetime_value2' => '2015-03-04 06:07:00',
'field_test_string_selectlist_value' => NULL,
))
->values(array(
'nid' => '1',
'vid' => '2001',
'uid' => '1',
'field_test_three_value' => '42.42',
'field_test_identical1_value' => '1',
'field_test_identical2_value' => '1',
'field_test_link_url' => 'https://www.drupal.org/project/drupal',
'field_test_link_title' => 'Drupal project page',
'field_test_link_attributes' => 's:32:"a:1:{s:6:"target";s:6:"_blank";}";',
'field_test_date_value' => '2013-01-02T04:05:00',
'field_test_datestamp_value' => '1391357160',
'field_test_datetime_value' => '2015-03-04 06:07:00',
'field_test_email_email' => 'PrincessRuwenne@example.com',
'field_test_filefield_fid' => '5',
'field_test_filefield_list' => '1',
'field_test_filefield_data' => 'a:1:{s:11:"description";s:4:"desc";}',
'field_test_four_value' => NULL,
'field_test_integer_selectlist_value' => '3412',
'field_test_float_single_checkbox_value' => '3',
'field_test_decimal_radio_buttons_value' => NULL,
'field_test_phone_value' => NULL,
'field_test_exclude_unset_value' => 'This is a field with exclude unset.',
'field_test_exclude_unset_format' => '1',
'field_test_imagefield_fid' => NULL,
'field_test_imagefield_list' => NULL,
'field_test_imagefield_data' => NULL,
'field_test_text_single_checkbox2_value' => 'Hello',
'field_test_datestamp_value2' => NULL,
'field_test_datetime_value2' => NULL,
'field_test_string_selectlist_value' => NULL,
))
->execute();
$connection->schema()->createTable('content_type_test_page', array(
'fields' => array(
......@@ -44470,7 +44501,7 @@
))
->values(array(
'nid' => '1',
'vid' => '1',
'vid' => '2001',
'type' => 'story',
'language' => '',
'title' => 'Test title rev 3',
......@@ -48083,6 +48114,16 @@
'vid' => '3',
'tid' => '3',
))
->values(array(
'nid' => '1',
'vid' => '2001',
'tid' => '1',
))
->values(array(
'nid' => '1',
'vid' => '2001',
'tid' => '2',
))
->values(array(
'nid' => '1',
'vid' => '2001',
......@@ -48283,6 +48324,14 @@
'list' => '0',
'weight' => '1',
))
->values(array(
'fid' => '1',
'nid' => '1',
'vid' => '5',
'description' => 'file 1-1-1',
'list' => '0',
'weight' => '-1',
))
->values(array(
'fid' => '3',
'nid' => '12',
......@@ -48291,6 +48340,14 @@
'list' => '0',
'weight' => '0',
))
->values(array(
'fid' => '1',
'nid' => '1',
'vid' => '2001',
'description' => 'file 1-1-1',
'list' => '0',
'weight' => '-1',
))
->execute();
$connection->schema()->createTable('url_alias', array(
'fields' => array(
......@@ -52,24 +52,24 @@ public function testNode() {
$node = Node::load(1);
$this->assertIdentical('1', $node->id(), 'Node 1 loaded.');
$this->assertIdentical('und', $node->langcode->value);
$this->assertIdentical('test', $node->body->value);
$this->assertIdentical('test', $node->body->summary);
$this->assertIdentical('body test rev 3', $node->body->value);
$this->assertIdentical('teaser test rev 3', $node->body->summary);
$this->assertIdentical('filtered_html', $node->body->format);
$this->assertIdentical('story', $node->getType(), 'Node has the correct bundle.');
$this->assertIdentical('Test title', $node->getTitle(), 'Node has the correct title.');
$this->assertIdentical('Test title rev 3', $node->getTitle(), 'Node has the correct title.');
$this->assertIdentical('1390095702', $node->getCreatedTime(), 'Node has the correct created time.');
$this->assertFalse($node->isSticky());
$this->assertIdentical('1', $node->getOwnerId());
$this->assertIdentical('1390095702', $node->getRevisionCreationTime());
$this->assertIdentical('1420861423', $node->getRevisionCreationTime());
/** @var \Drupal\node\NodeInterface $node_revision */
$node_revision = \Drupal::entityTypeManager()->getStorage('node')->loadRevision(1);
$this->assertIdentical('Test title', $node_revision->getTitle());
$this->assertIdentical('1', $node_revision->getRevisionUser()->id(), 'Node revision has the correct user');
$node_revision = \Drupal::entityTypeManager()->getStorage('node')->loadRevision(2001);
$this->assertIdentical('Test title rev 3', $node_revision->getTitle());
$this->assertIdentical('2', $node_revision->getRevisionUser()->id(), 'Node revision has the correct user');
$this->assertSame('1', $node_revision->id(), 'Node 1 loaded.');
$this->assertSame('1', $node_revision->getRevisionId(), 'Node 1 revision 1 loaded.');
$this->assertSame('2001', $node_revision->getRevisionId(), 'Node 1 revision 2001 loaded.');
// This is empty on the first revision.
$this->assertIdentical(NULL, $node_revision->revision_log->value);
$this->assertIdentical('modified rev 3', $node_revision->revision_log->value);
$this->assertIdentical('This is a shared text field', $node->field_test->value);
$this->assertIdentical('filtered_html', $node->field_test->format);
$this->assertIdentical('10', $node->field_test_two->value);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment