class EntityResourceValidationTraitTestClass in Drupal 9
Same name and namespace in other branches
- 8 core/modules/rest/tests/src/Unit/EntityResourceValidationTraitTest.php \Drupal\Tests\rest\Unit\EntityResourceValidationTraitTestClass
A test class to use to test EntityResourceValidationTrait.
Using ->getMockForTrait is problematic, as this trait is marked internal. Because the mock doesn't use the \Drupal namespace, the Symfony 4+ class loader will throw a deprecation error.
Hierarchy
- class \Drupal\Tests\rest\Unit\EntityResourceValidationTraitTestClass uses EntityResourceValidationTrait
Expanded class hierarchy of EntityResourceValidationTraitTestClass
File
- core/
modules/ rest/ tests/ src/ Unit/ EntityResourceValidationTraitTest.php, line 82
Namespace
Drupal\Tests\rest\UnitView source
class EntityResourceValidationTraitTestClass {
use EntityResourceValidationTrait;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityResourceValidationTrait:: |
protected | function | Verifies that an entity does not violate any validation constraints. |