You are here

public function RecursiveContextualValidatorTest::testValidatePropertyValueWithInvalidObjects in Drupal 9

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php \Drupal\Tests\Core\TypedData\RecursiveContextualValidatorTest::testValidatePropertyValueWithInvalidObjects()

@covers ::validatePropertyValue

@dataProvider providerTestValidatePropertyWithInvalidObjects

File

core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php, line 290
Contains \Drupal\Tests\Core\TypedData\RecursiveContextualValidatorTest.

Class

RecursiveContextualValidatorTest
@coversDefaultClass \Drupal\Core\TypedData\Validation\RecursiveContextualValidator @group typedData

Namespace

Drupal\Tests\Core\TypedData

Code

public function testValidatePropertyValueWithInvalidObjects($object) {
  $this
    ->expectException(\InvalidArgumentException::class);
  $this->recursiveValidator
    ->validatePropertyValue($object, 'key1', [], NULL);
}