heartbeatwebtestcase.inc in Heartbeat 6.4
File
tests/heartbeatwebtestcase.inc
View source
<?php
class HeartbeatWebTestCase extends DrupalWebTestCase {
protected $testRoles = array(
'administer content types',
'access content',
'view revisions',
'administer nodes',
'access user profiles',
'view heartbeat messages',
'configure heartbeat messages',
'view personal heartbeat activity',
);
protected $templatesLoaded = FALSE;
function tearDown() {
parent::tearDown();
}
protected function debugHelper($value, $mode = 'a+') {
$debug = fopen($this->originalFileDirectory . '/simpletestdebug.txt', $mode);
fwrite($debug, print_r($value, TRUE) . "\n");
fclose($debug);
}
protected function configureStream($stream_name, $args) {
if (!$this->templatesLoaded) {
$this
->drupalGet('admin/build/heartbeat');
$this->templatesLoaded = TRUE;
}
$this
->drupalPost('admin/build/heartbeat/stream/' . $stream_name, $args, t('Submit'));
}
}