public function WebformDefaultFieldsTestCase::testNodeAddingWithTwoFields in Webform Default Fields 7.4
Same name and namespace in other branches
- 6 tests/webform_default_fields.test \WebformDefaultFieldsTestCase::testNodeAddingWithTwoFields()
- 7 tests/webform_default_fields.test \WebformDefaultFieldsTestCase::testNodeAddingWithTwoFields()
- 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']));
}