function RecursiveContextualValidatorTest::testValidateWithGroups

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

Ensures that passing an explicit group is not supported.

@covers ::validate

File

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

Class

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

Namespace

Drupal\Tests\Core\TypedData

Code

public function testValidateWithGroups() : void {
    $this->expectException(\LogicException::class);
    $this->recursiveValidator
        ->validate('test', NULL, 'test group');
}

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