public function CommentAlterListStringTest::testOptionsButtonSingle in Comment Alter 8
Tests for single valued List (string) fields comment altering.
File
- tests/
src/ Functional/ CommentAlterListStringTest.php, line 96
Class
- CommentAlterListStringTest
- Tests the comment alter module functions for List (string) fields.
Namespace
Drupal\Tests\comment_alter\FunctionalCode
public function testOptionsButtonSingle() {
$field_name = $this
->addOptionField('options_buttons', 1);
$this
->createEntityObject([
$field_name => [
'value' => 1,
],
]);
$this
->postComment([
"comment_alter_fields[{$field_name}]" => 2,
]);
$this
->assertCommentDiff([
$field_name => [
[
1,
2,
],
],
]);
$this
->assertRevisionDelete();
}