function RecursiveContextualValidatorTest::testValidateWithoutTypedData

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

@covers ::validate

File

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

Class

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

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.