private function HeartbeatAPI::createSimpleNode in Heartbeat 7
Creates a simple node, used to populate heartbeat activity table.
1 call to HeartbeatAPI::createSimpleNode()
- HeartbeatAPI::testLogging in tests/
heartbeat.api.test - Tests logging through API function calls.
File
- tests/
heartbeat.api.test, line 28 - Heartbeat API tests.
Class
- HeartbeatAPI
- Test basic API.
Code
private function createSimpleNode() {
// Create a node.
$edit = array();
$langcode = LANGUAGE_NONE;
$edit["title"] = $this
->randomName(8);
$edit["body[{$langcode}][0][value]"] = $this
->randomName(16);
$this
->drupalPost('node/add/page', $edit, t('Save'));
// Check that the Basic page has been created.
$this
->assertRaw(t('!post %title has been created.', array(
'!post' => 'Basic page',
'%title' => $edit["title"],
)), t('Basic page created.'));
return $edit["title"];
}