You are here

public function SchedulerTestBase::assertRevisionLogMessage in Scheduler 7

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.

string $group: The type of assertion - examples are "Browser", "PHP".

Return value

bool TRUE if the assertion succeeded, FALSE otherwise.

1 call to SchedulerTestBase::assertRevisionLogMessage()
SchedulerFunctionalTest::testRevisioning in tests/scheduler.test
Tests the creation of new revisions on scheduling.

File

tests/scheduler.test, line 149
Scheduler module test case file.

Class

SchedulerTestBase
Provides common helper methods for Scheduler module tests.

Code

public function assertRevisionLogMessage($nid, $value, $message = '', $group = 'Other') {
  $log_message = db_select('node_revision', 'r')
    ->fields('r', array(
    'log',
  ))
    ->condition('nid', $nid)
    ->orderBy('vid', 'DESC')
    ->range(0, 1)
    ->execute()
    ->fetchColumn();
  return $this
    ->assertEqual($log_message, $value, $message, $group);
}