You are here

function DrupalWebTestCase::drupalGetNodeByTitle in SimpleTest 6.2

Same name and namespace in other branches
  1. 7.2 drupal_web_test_case.php \DrupalWebTestCase::drupalGetNodeByTitle()
  2. 7 drupal_web_test_case.php \DrupalWebTestCase::drupalGetNodeByTitle()

Get a node from the database based on its title.

Parameters

title: A node title, usually generated by $this->randomName().

Return value

A node object matching $title.

File

./drupal_web_test_case.php, line 842

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

function drupalGetNodeByTitle($title) {
  return node_load(array(
    'title' => $title,
  ));
}