function MigrateNodeRevisionTest::testNodeRevisions
Same name in other branches
- 9 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeRevisionTest::testNodeRevisions()
- 10 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeRevisionTest::testNodeRevisions()
- 11.x core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeRevisionTest::testNodeRevisions()
Tests the migration of node revisions with translated nodes.
File
-
core/
modules/ node/ tests/ src/ Kernel/ Migrate/ d7/ MigrateNodeRevisionTest.php, line 111
Class
- MigrateNodeRevisionTest
- Tests node revision migrations.
Namespace
Drupal\Tests\node\Kernel\Migrate\d7Code
public function testNodeRevisions() {
$this->assertRevision(1, 'en', 'An English Node', NULL, '1441032132');
$this->assertRevision(2, 'en', 'The thing about Deep Space 9 (1st rev)', 'DS9 1st rev', '1564543588');
$this->assertRevision(4, 'is', 'is - The thing about Firefly (1st rev)', 'is - Firefly 1st rev', '1478755274');
$this->assertRevision(6, 'en', 'Comments are closed :-(', NULL, '1504715414');
$this->assertRevision(7, 'en', 'Comments are open :-)', NULL, '1504715432');
$this->assertRevision(8, 'en', 'The number 47', NULL, '1552126363');
// Test that the revision translation are not migrated and there should not
// be a revision with id of 9.
$ids = [
3,
5,
9,
];
foreach ($ids as $id) {
$this->assertNull($this->nodeStorage
->loadRevision($id));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.