You are here

function NodesInBlockTestCase::_updateNode in Nodes In Block 7

Helper function to update an existing node.

1 call to NodesInBlockTestCase::_updateNode()
NodesInBlockTestCase::testNodeSubmissions in ./nodesinblock.test
Test submitting of nodes and see if they appear in blocks and how they are rendered.

File

./nodesinblock.test, line 84
Tests for Nodes in block

Class

NodesInBlockTestCase
@file Tests for Nodes in block

Code

function _updateNode($nid = 1, $edit = array()) {
  $this
    ->drupalPost('node/' . $nid . '/edit', $edit, t('Save'));
  $result = db_query("SELECT nid FROM {nodesinblock} WHERE nid = :nid", array(
    ':nid' => $nid,
  ))
    ->fetchField();
  $this
    ->assertTrue($result, 'Node ' . $nid . ' updated in nodesinblock table', 'Node submission');
}