protected function CommentAlterImageTest::addImageField in Comment Alter 8
Adds an image field to the parent enity.
Parameters
int $cardinality: Cardinality of the field.
Return value
string The name of the field which was created.
2 calls to CommentAlterImageTest::addImageField()
- CommentAlterImageTest::testImageFieldMultiple in tests/
src/ Functional/ CommentAlterImageTest.php - Tests for multi valued image field comment altering.
- CommentAlterImageTest::testImageFieldSingle in tests/
src/ Functional/ CommentAlterImageTest.php - Tests for single valued image field comment altering.
File
- tests/
src/ Functional/ CommentAlterImageTest.php, line 28
Class
- CommentAlterImageTest
- Tests the comment alter module functions for image fields.
Namespace
Drupal\Tests\comment_alter\FunctionalCode
protected function addImageField($cardinality) {
return $this
->addField('image', 'image_image', [
'cardinality' => $cardinality,
]);
}