You are here

public function SchedulerApiTestCase::assertNodePublished in Scheduler 7

Check to see if a node is published.

Parameters

int $nid: The id of the node to check.

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 SchedulerApiTestCase::assertNodePublished()
SchedulerApiTestCase::testAllowedPublishing in tests/scheduler_api.test
Tests hook_scheduler_allow().

File

tests/scheduler_api.test, line 136
Tests for the Scheduler API.

Class

SchedulerApiTestCase
Tests to cover the Scheduler API functions.

Code

public function assertNodePublished($nid, $message = NULL, $group = 'Other') {
  $message = $message ? $message : format_string('Node %nid is published', array(
    '%nid' => $nid,
  ));
  return $this
    ->assertTrue($this
    ->getPublicationStatus($nid), $message, $group);
}