protected function SocialUserNameConstraintTest::itemsMock in Open Social 8.7
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::itemsMock()
- 8 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 8.2 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 8.3 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 8.4 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 8.5 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 8.6 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 8.8 modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 10.3.x modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 10.0.x modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 10.1.x modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
- 10.2.x modules/social_features/social_user/tests/src/Unit/Validation/Constraint/SocialUserNameConstraintTest.php \Drupal\social_user\Tests\SocialUserNameConstraintTest::itemsMock()
1 call to SocialUserNameConstraintTest::itemsMock()
- 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 175
Class
- SocialUserNameConstraintTest
- @coversDefaultClass \Drupal\social_user\Plugin\Validation\Constraint\SocialUserNameConstraintValidator
Namespace
Drupal\social_user\TestsCode
protected function itemsMock($name) {
$name_field = $this
->getMock('Drupal\\Core\\Field\\FieldItemInterface');
$name_field
->expects($this
->any())
->method('__get')
->willReturn($name);
$field_definition = $this
->getMock('Drupal\\Core\\Field\\FieldDefinitionInterface');
$items = $this
->getMock('Drupal\\Core\\Field\\FieldItemListInterface');
$items
->expects($this
->any())
->method('getFieldDefinition')
->willReturn($field_definition);
$items
->expects($this
->any())
->method('first')
->willReturn($name_field);
return $items;
}