function MigrateNodeRevisionTest::assertRevision
Same name in this branch
- 8.9.x core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d6\MigrateNodeRevisionTest::assertRevision()
Same name in other branches
- 9 core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d6\MigrateNodeRevisionTest::assertRevision()
- 9 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeRevisionTest::assertRevision()
- 10 core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d6\MigrateNodeRevisionTest::assertRevision()
- 10 core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeRevisionTest::assertRevision()
- 11.x core/modules/node/tests/src/Kernel/Migrate/d6/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d6\MigrateNodeRevisionTest::assertRevision()
- 11.x core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php \Drupal\Tests\node\Kernel\Migrate\d7\MigrateNodeRevisionTest::assertRevision()
Asserts various aspects of a node revision.
Parameters
int $id: The revision ID.
string $langcode: The revision language.
string $title: The expected title.
string $log: The revision log message.
int $timestamp: The revision's time stamp.
1 call to MigrateNodeRevisionTest::assertRevision()
- MigrateNodeRevisionTest::testNodeRevisions in core/
modules/ node/ tests/ src/ Kernel/ Migrate/ d7/ MigrateNodeRevisionTest.php - Tests the migration of node revisions with translated nodes.
File
-
core/
modules/ node/ tests/ src/ Kernel/ Migrate/ d7/ MigrateNodeRevisionTest.php, line 99
Class
- MigrateNodeRevisionTest
- Tests node revision migrations.
Namespace
Drupal\Tests\node\Kernel\Migrate\d7Code
protected function assertRevision($id, $langcode, $title, $log, $timestamp) {
$revision = $this->nodeStorage
->loadRevision($id);
$this->assertInstanceOf(NodeInterface::class, $revision);
$this->assertSame($title, $revision->getTitle());
$this->assertSame($langcode, $revision->language()
->getId());
$this->assertSame($log, $revision->revision_log->value);
$this->assertIdentical($timestamp, $revision->getRevisionCreationTime());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.