You are here

public function WebformDefaultFieldsTestCase::testNodeAddingWithTwoFields in Webform Default Fields 7.4

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

Test adding two fields to node.

File

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

Class

WebformDefaultFieldsTestCase
Tests the module functionality.

Code

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