public function CommentAlterDeletedRevisionTestCase::testOptionsSelectSingle in Comment Alter 7
File
- ./
comment_alter.test, line 662 - Functional tests for the Comment Alter module.
Class
- CommentAlterDeletedRevisionTestCase
- Functional tests for Comment Alter and deleted revision.
Code
public function testOptionsSelectSingle() {
$field_name = $this
->createField('list_text', 'options_select', array(
'settings' => array(
'allowed_values' => array(
1 => 'One',
2 => 'Two',
3 => 'Three',
),
),
'cardinality' => 1,
));
$node = $this
->createNodeThenPostComment(array(
$field_name => array(
LANGUAGE_NONE => array(
0 => array(
'value' => 1,
),
),
),
), array(
"{$field_name}[" . LANGUAGE_NONE . ']' => '2',
));
$this
->postComment($node->nid, array(
"{$field_name}[" . LANGUAGE_NONE . ']' => '3',
));
$this
->drupalGet('node/' . $node->nid . '/revisions');
$this
->clickLink(t('Delete'));
$this
->drupalPost(NULL, array(), t('Delete'));
$this
->drupalGet('node/' . $node->nid);
}