function RecursiveContextualValidatorTest::testValidateWithoutTypedData

Ensures that passing a non typed data value is not supported.

@legacy-covers ::validate

File

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

Class

RecursiveContextualValidatorTest
Tests Drupal\Core\TypedData\Validation\RecursiveContextualValidator.

Namespace

Drupal\Tests\Core\TypedData

Code

public function testValidateWithoutTypedData() : void {
  $this->expectException(\InvalidArgumentException::class);
  $this->recursiveValidator
    ->validate('test');
}

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