public function RecursiveContextualValidatorTest::testValidatePropertyWithCustomGroup in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php \Drupal\Tests\Core\TypedData\RecursiveContextualValidatorTest::testValidatePropertyWithCustomGroup()
@covers ::validateProperty
File
- core/
tests/ Drupal/ Tests/ Core/ TypedData/ RecursiveContextualValidatorTest.php, line 231 - Contains \Drupal\Tests\Core\TypedData\RecursiveContextualValidatorTest.
Class
- RecursiveContextualValidatorTest
- @coversDefaultClass \Drupal\Core\TypedData\Validation\RecursiveContextualValidator @group typedData
Namespace
Drupal\Tests\Core\TypedDataCode
public function testValidatePropertyWithCustomGroup() {
$tree = [
'value' => [],
'properties' => [
'key1' => [
'value' => 'value1',
],
],
];
$typed_data = $this
->setupTypedData($tree, 'test_name');
$this
->expectException(\LogicException::class);
$this->recursiveValidator
->validateProperty($typed_data, 'key1', 'test group');
}