public function CommentAlterTextTestCase::testTextFieldSingle in Comment Alter 7
File
- ./
comment_alter.test, line 471 - Functional tests for the Comment Alter module.
Class
- CommentAlterTextTestCase
- Functional tests for Comment Alter and Text fields.
Code
public function testTextFieldSingle() {
$field_name = $this
->createField('text', 'text_textfield', array(
'cardinality' => 1,
));
$old_value = $this
->randomName();
$new_value = $this
->randomName();
$this
->assertNotEqual($old_value, $new_value);
$this
->createNodeThenPostComment(array(
$field_name => array(
LANGUAGE_NONE => array(
0 => array(
'value' => $old_value,
),
),
),
), array(
"{$field_name}[" . LANGUAGE_NONE . '][0][value]' => $new_value,
));
$this
->assertCommentDiff(array(
$field_name => array(
array(
$old_value,
$new_value,
),
),
));
}