public function ThunderParagraphsTestTrait::addImageParagraph in Thunder 6.2.x
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addImageParagraph()
- 8.2 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addImageParagraph()
- 8.3 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addImageParagraph()
- 8.4 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addImageParagraph()
- 6.0.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addImageParagraph()
- 6.1.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::addImageParagraph()
Add Image paragraph.
Parameters
string $fieldName: Field name.
array $media: List of media identifiers.
int $position: Position of the paragraph.
3 calls to ThunderParagraphsTestTrait::addImageParagraph()
- ArticleCreationTest::testCreateArticle in tests/
src/ FunctionalJavascript/ ArticleCreationTest.php - Test Creation of Article.
- ChannelsTagsTest::testChannelsCreation in tests/
src/ FunctionalJavascript/ ChannelsTagsTest.php - Test channel creation, tagging of articles and channel page with articles.
- ModuleIntegrationTest::testDiffModule in tests/
src/ FunctionalJavascript/ ModuleIntegrationTest.php - Testing integration of "diff" module.
File
- tests/
src/ FunctionalJavascript/ ThunderParagraphsTestTrait.php, line 134
Class
- ThunderParagraphsTestTrait
- Trait for handling of Paragraph related test actions.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
public function addImageParagraph($fieldName, array $media, $position = NULL) {
$paragraphIndex = $this
->addParagraph($fieldName, 'image', $position);
$this
->selectMedia("{$fieldName}_{$paragraphIndex}_subform_field_image", 'image_browser', $media);
}