You are here

function ReadMoreControlTestCase::createNode in Read More Control 7

Helper method to create a new node.

1 call to ReadMoreControlTestCase::createNode()
ReadMoreControlTestCase::testNodeEntities in ./readmorecontrol.test
Tests three node content types and fields.

File

./readmorecontrol.test, line 335
Tests for readmorecontrol.module.

Class

ReadMoreControlTestCase
Tests for number field types.

Code

function createNode($bundle, $edit = array()) {
  $edit['title'] = $this
    ->randomName(8);
  $this
    ->drupalPost("node/add/{$bundle}", $edit, t('Save'));

  // Check that the node exists in the database.
  return $this
    ->drupalGetNodeByTitle($edit['title']);
}