public function CommentAlterListTextTestCase::testOptionsButtonsMultiple in Comment Alter 7
File
- ./
comment_alter.test, line 431 - Functional tests for the Comment Alter module.
Class
- CommentAlterListTextTestCase
- Functional tests for Comment Alter and List (text) fields.
Code
public function testOptionsButtonsMultiple() {
$field_name = $this
->createField('list_text', 'options_buttons', array(
'settings' => array(
'allowed_values' => array(
1 => 'One',
2 => 'Two',
3 => 'Three',
),
),
'cardinality' => -1,
));
$this
->createNodeThenPostComment(array(
$field_name => array(
LANGUAGE_NONE => array(
0 => array(
'value' => 1,
),
),
),
), array(
"{$field_name}[" . LANGUAGE_NONE . '][2]' => TRUE,
));
$this
->assertCommentDiff(array(
$field_name => array(
array(
'One',
'One',
),
array(
NULL,
'Two',
),
),
));
}