function ReadMoreControlTestCase::drupalGetNodeByTitle in Read More Control 7
Helper method to load a node from a title.
Overrides DrupalWebTestCase::drupalGetNodeByTitle
1 call to ReadMoreControlTestCase::drupalGetNodeByTitle()
- ReadMoreControlTestCase::createNode in ./
readmorecontrol.test - Helper method to create a new node.
File
- ./
readmorecontrol.test, line 346 - Tests for readmorecontrol.module.
Class
- ReadMoreControlTestCase
- Tests for number field types.
Code
function drupalGetNodeByTitle($title, $reset = FALSE) {
// Load the first node returned from the database.
$nodes = node_load_multiple(array(), array(
'title' => $title,
), $reset);
$node = reset($nodes);
return $node;
}