protected function SocialUserNameConstraintTest::buildViolationList in Open Social 8
Same name and namespace in other branches
- 8.9 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 8.2 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 8.3 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 8.4 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 8.5 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 8.6 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 8.7 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 8.8 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 10.3.x modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 10.0.x modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 10.1.x modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
- 10.2.x modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::buildViolationList()
Builds a list interface to return violations.
Parameters
int $number_of_items: Number of items you want to build in the list.
Return value
ConstraintViolationListInterface Mock constraintViolationItems with the count of $number_of_items.
1 call to SocialUserNameConstraintTest::buildViolationList()
- SocialUserNameConstraintTest::providerTestValidate in modules/
social_features/ social_user/ tests/ src/ Unit/ Validation/ Constraint/ SocialUserNameConstraintTest.php - Data provider for ::testValidate().
File
- modules/
social_features/ social_user/ tests/ src/ Unit/ Validation/ Constraint/ SocialUserNameConstraintTest.php, line 201
Class
- SocialUserNameConstraintTest
- @coversDefaultClass \Drupal\social_user\Plugin\Validation\Constraint\SocialUserNameConstraintValidator
Namespace
Drupal\social_user\TestsCode
protected function buildViolationList($number_of_items) {
$violationList = [];
for ($count = 0; $count < $number_of_items; $count++) {
$violation = $this
->getMock('Symfony\\Component\\Validator\\ConstraintViolationInterface');
$violationList[] = $violation;
}
return $violationList;
}