function ComponentValidatorTest::testValidateDefinitionInvalid
Same name in this branch
- 10 core/modules/sdc/tests/src/Unit/ComponentValidatorTest.php \Drupal\Tests\sdc\Unit\ComponentValidatorTest::testValidateDefinitionInvalid()
Same name in other branches
- 11.x core/modules/sdc/tests/src/Unit/ComponentValidatorTest.php \Drupal\Tests\sdc\Unit\ComponentValidatorTest::testValidateDefinitionInvalid()
- 11.x core/tests/Drupal/Tests/Core/Theme/Component/ComponentValidatorTest.php \Drupal\Tests\Core\Theme\Component\ComponentValidatorTest::testValidateDefinitionInvalid()
Tests invalid component definitions.
@dataProvider dataProviderValidateDefinitionInvalid
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ Component/ ComponentValidatorTest.php, line 58
Class
- ComponentValidatorTest
- Unit tests for the component validation.
Namespace
Drupal\Tests\Core\Theme\ComponentCode
public function testValidateDefinitionInvalid(array $definition) : void {
$this->expectException(InvalidComponentException::class);
$component_validator = new ComponentValidator();
$component_validator->setValidator();
$component_validator->validateDefinition($definition, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.