You are here

function HeartbeatRulesTest::testHeartbeatLogger in Heartbeat 6.4

Tests if a heartbeat message is logged for an event.

File

modules/heartbeat_rules/tests/heartbeat.rules.test, line 36

Class

HeartbeatRulesTest
Class HeartbeatRulesTest

Code

function testHeartbeatLogger() {
  $this
    ->drupalLogin($this
    ->drupalCreateUser($this->testRoles));
  $page_node = $this
    ->drupalCreateNode(array(
    'type' => 'page',
    'title' => 'MyFirstPage',
  ));

  // Get a stream page and check if the page post appears in the heartbeat activity stream.
  $this
    ->drupalGet('heartbeat/publicheartbeat');
  $this
    ->assertText('MyFirstPage', t('The page title is displayed in the public heartbeat stream.'), t('Heartbeat'));
}