protected function MigrateNodeTest::assertRevision in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Tests/Migrate/d7/MigrateNodeTest.php \Drupal\node\Tests\Migrate\d7\MigrateNodeTest::assertRevision()
Asserts various aspects of a node revision.
Parameters
int $id: The revision ID.
string $title: The expected title.
int $uid: The revision author ID.
string $log: The revision log message.
int $timestamp: The revision's time stamp.
1 call to MigrateNodeTest::assertRevision()
- MigrateNodeTest::testNode in core/
modules/ node/ src/ Tests/ Migrate/ d7/ MigrateNodeTest.php - Test node migration from Drupal 7 to 8.
File
- core/
modules/ node/ src/ Tests/ Migrate/ d7/ MigrateNodeTest.php, line 112 - Contains \Drupal\node\Tests\Migrate\d7\MigrateNodeTest.
Class
- MigrateNodeTest
- Tests node migration.
Namespace
Drupal\node\Tests\Migrate\d7Code
protected function assertRevision($id, $title, $uid, $log, $timestamp) {
$revision = \Drupal::entityManager()
->getStorage('node')
->loadRevision($id);
$this
->assertTrue($revision instanceof NodeInterface);
$this
->assertIdentical($title, $revision
->getTitle());
$this
->assertIdentical($uid, $revision
->getRevisionAuthor()
->id());
$this
->assertIdentical($log, $revision->revision_log->value);
$this
->assertIdentical($timestamp, $revision
->getRevisionCreationTime());
}