protected function SchedulerRevisioningTest::assertRevisionLogMessage in Scheduler 8
Check if the latest revision log message of a node matches a given string.
Parameters
int $nid: The node id of the node to check.
string $value: The value with which the log message will be compared.
string $message: The message to display along with the assertion.
Return value
bool TRUE if the assertion succeeded, FALSE otherwise.
1 call to SchedulerRevisioningTest::assertRevisionLogMessage()
- SchedulerRevisioningTest::testRevisioning in tests/
src/ Functional/ SchedulerRevisioningTest.php - Tests the creation of new revisions on scheduling.
File
- tests/
src/ Functional/ SchedulerRevisioningTest.php, line 66
Class
- SchedulerRevisioningTest
- Tests revision options when Scheduler publishes or unpublishes content.
Namespace
Drupal\Tests\scheduler\FunctionalCode
protected function assertRevisionLogMessage($nid, $value, $message = '') {
// Retrieve the latest revision log message for this node.
$log_message = $this->database
->select('node_revision', 'r')
->fields('r', [
'revision_log',
])
->condition('nid', $nid)
->orderBy('vid', 'DESC')
->range(0, 1)
->execute()
->fetchField();
return $this
->assertEquals($value, $log_message, $message);
}