You are here

public function WebformDefaultFieldsTestCase::testNodeAdding in Webform Default Fields 7.4

Same name and namespace in other branches
  1. 6 tests/webform_default_fields.test \WebformDefaultFieldsTestCase::testNodeAdding()
  2. 7 tests/webform_default_fields.test \WebformDefaultFieldsTestCase::testNodeAdding()
  3. 7.3 tests/webform_default_fields.test \WebformDefaultFieldsTestCase::testNodeAdding()

Test adding field to node.

File

tests/webform_default_fields.test, line 76
Webform Default Fields module tests.

Class

WebformDefaultFieldsTestCase
Tests the module functionality.

Code

public function testNodeAdding() {
  $this
    ->addTestComponent();
  $new_node = new stdClass();
  $new_node->type = $this->contentType;
  node_save($new_node);
  $this
    ->assertEqual(1, count($new_node->webform['components']));
}