Skip to content
Snippets Groups Projects
Commit a3f4ab15 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #931512 by ahwebd, catch, tobiasb: Fixed Node body 'description' and...

Issue #931512 by ahwebd, catch, tobiasb: Fixed Node body 'description' and 'required' are missed on nodes upgraded from D6 to D7.
parent 5dc4ddd9
No related branches found
No related tags found
No related merge requests found
......@@ -628,6 +628,8 @@ function node_update_7006(&$sandbox) {
'entity_type' => 'node',
'bundle' => $node_type->type,
'label' => $node_type->body_label,
'description' => isset($node_type->description) ? $node_type->description : '',
'required' => (isset($node_type->min_word_count) && $node_type->min_word_count > 0) ? 1 : 0,
'widget' => array(
'type' => 'text_textarea_with_summary',
'settings' => array(
......
......@@ -27,6 +27,11 @@ class NodeBodyUpgradePathTestCase extends UpgradePathTestCase {
*/
public function testNodeBodyUpgrade() {
$this->assertTrue($this->performUpgrade(), t('The upgrade was completed successfully.'));
$instance = field_info_instance('node', 'body', 'story');
$this->assertIdentical($instance['required'], 0, 'The required setting was preserved during the upgrade path.');
$this->assertTrue($instance['description'], 'The description was preserved during the upgrade path');
$this->drupalGet("content/1263769200");
$this->assertText('node body (broken) - 37');
......
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