function RecursiveContextualValidatorTest::testValidatePropertyWithInvalidObjects

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php \Drupal\Tests\Core\TypedData\RecursiveContextualValidatorTest::testValidatePropertyWithInvalidObjects()
  2. 8.9.x core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php \Drupal\Tests\Core\TypedData\RecursiveContextualValidatorTest::testValidatePropertyWithInvalidObjects()
  3. 10 core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php \Drupal\Tests\Core\TypedData\RecursiveContextualValidatorTest::testValidatePropertyWithInvalidObjects()

@covers ::validateProperty

@dataProvider providerTestValidatePropertyWithInvalidObjects

File

core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php, line 248

Class

RecursiveContextualValidatorTest
@coversDefaultClass \Drupal\Core\TypedData\Validation\RecursiveContextualValidator[[api-linebreak]] @group TypedData

Namespace

Drupal\Tests\Core\TypedData

Code

public function testValidatePropertyWithInvalidObjects($object) : void {
  $this->expectException(\InvalidArgumentException::class);
  $this->recursiveValidator
    ->validateProperty($object, 'key1', NULL);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.