You are here

public function RecursiveContextualValidatorTest::testBasicValidateWithoutConstraints 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::testBasicValidateWithoutConstraints()

@covers ::validate

File

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

Class

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

Namespace

Drupal\Tests\Core\TypedData

Code

public function testBasicValidateWithoutConstraints() {
  $typed_data = $this->typedDataManager
    ->create(DataDefinition::create('string'));
  $violations = $this->recursiveValidator
    ->validate($typed_data);
  $this
    ->assertCount(0, $violations);
}