Commit e0d3aca1 authored by alexpott's avatar alexpott

Issue #2333357 by tstoeckler, benjy: Fixed Migrate node_revisions.timestamp...

Issue #2333357 by tstoeckler, benjy: Fixed Migrate node_revisions.timestamp into the revision_timestamp field.
parent 6bad26f4
......@@ -14,6 +14,7 @@ process:
status: status
created: created
changed: changed
revision_timestamp: timestamp
promote: promote
sticky: sticky
'body/format':
......
......@@ -51,6 +51,7 @@ public function query() {
'body',
'teaser',
'format',
'timestamp',
));
$query->innerJoin('node', 'n', static::JOIN);
......@@ -78,6 +79,7 @@ public function fields() {
'log' => $this->t('Revision Log message'),
'language' => $this->t('Language (fr, en, ...)'),
'tnid' => $this->t('The translation set id for this node'),
'timestamp' => $this->t('The timestamp the latest revision of this node was created.'),
);
return $fields;
}
......
......@@ -45,7 +45,7 @@ public function testNode() {
$this->assertEqual($node->getCreatedTime(), 1388271197, 'Node has the correct created time.');
$this->assertEqual($node->isSticky(), FALSE);
$this->assertEqual($node->getOwnerId(), 1);
//$this->assertEqual($node->getRevisionCreationTime(), 1390095701, 'Node has the correct revision timestamp.');
$this->assertEqual($node->getRevisionCreationTime(), 1390095701, 'Node has the correct revision timestamp.');
// It is pointless to run the second half from MigrateDrupal6Test.
if (empty($this->standalone)) {
......
......@@ -40,6 +40,7 @@ class NodeTest extends MigrateSqlSourceTestCase {
'title' => 'node title 1',
'uid' => 1,
'status' => 1,
'timestamp' => 1279051598,
'created' => 1279051598,
'changed' => 1279051598,
'comment' => 2,
......@@ -62,6 +63,7 @@ class NodeTest extends MigrateSqlSourceTestCase {
'title' => 'node title 2',
'uid' => 1,
'status' => 1,
'timestamp' => 1279290908,
'created' => 1279290908,
'changed' => 1279308993,
'comment' => 0,
......@@ -84,6 +86,7 @@ class NodeTest extends MigrateSqlSourceTestCase {
'title' => 'node title 5',
'uid' => 1,
'status' => 1,
'timestamp' => 1279290908,
'created' => 1279290908,
'changed' => 1279308993,
'comment' => 0,
......@@ -104,7 +107,7 @@ class NodeTest extends MigrateSqlSourceTestCase {
*/
protected function setUp() {
foreach ($this->expectedResults as $k => $row) {
foreach (array('nid', 'vid', 'title', 'uid', 'body', 'teaser', 'format') as $i => $field) {
foreach (array('nid', 'vid', 'title', 'uid', 'body', 'teaser', 'format', 'timestamp') as $i => $field) {
$this->databaseContents['node_revisions'][$k][$field] = $row[$field];
// Keep nid and vid.
if ($i > 1) {
......
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