protected function ThunderParagraphsTestTrait::getNumberOfParagraphs in Thunder 8.3
Same name and namespace in other branches
- 8.5 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
- 8.2 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
- 8.4 tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
- 6.2.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
- 6.0.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
- 6.1.x tests/src/FunctionalJavascript/ThunderParagraphsTestTrait.php \Drupal\Tests\thunder\FunctionalJavascript\ThunderParagraphsTestTrait::getNumberOfParagraphs()
Get number of paragraphs for defined field on current page.
Parameters
string $fieldName: Paragraph field name.
Return value
int Returns number of paragraphs.
2 calls to ThunderParagraphsTestTrait::getNumberOfParagraphs()
- ParagraphsFeaturesTest::testDeleteConfirmation in tests/
src/ FunctionalJavascript/ Integration/ ParagraphsFeaturesTest.php - Testing of delete confirmation for paragraphs.
- ThunderParagraphsTestTrait::addParagraph in tests/
src/ FunctionalJavascript/ ThunderParagraphsTestTrait.php - Add paragraph for field with defined paragraph type.
File
- tests/
src/ FunctionalJavascript/ ThunderParagraphsTestTrait.php, line 24
Class
- ThunderParagraphsTestTrait
- Trait for handling of Paragraph related test actions.
Namespace
Drupal\Tests\thunder\FunctionalJavascriptCode
protected function getNumberOfParagraphs($fieldName) {
$paragraphRows = $this
->getParagraphItems($fieldName);
return count($paragraphRows);
}