heartbeat.rules.test in Heartbeat 6.4
File
modules/heartbeat_rules/tests/heartbeat.rules.test
View source
<?php
require_once dirname(__FILE__) . '/../../../tests/heartbeatwebtestcase.inc';
class HeartbeatRulesTest extends HeartbeatWebTestCase {
function getInfo() {
return array(
'name' => t('Heartbeat rules test'),
'description' => t('Test heartbeat logging functionality with rules'),
'group' => t('Heartbeat'),
);
}
function setUp() {
parent::setUp('token', 'rules', 'heartbeat', 'hrules');
}
function testHeartbeatLogger() {
$this
->drupalLogin($this
->drupalCreateUser($this->testRoles));
$page_node = $this
->drupalCreateNode(array(
'type' => 'page',
'title' => 'MyFirstPage',
));
$this
->drupalGet('heartbeat/publicheartbeat');
$this
->assertText('MyFirstPage', t('The page title is displayed in the public heartbeat stream.'), t('Heartbeat'));
}
}