public function PluginDefinitionValidatorTest::testValidateContextDefinitions in Plugin 8.2
@covers ::validateContextDefinitions
@dataProvider providerValidateContextDefinitions
Parameters
bool $valid: Whether or not the class is valid.
mixed[] $definitions: The context definitions to validate.
File
- tests/
src/ Unit/ PluginDefinition/ PluginDefinitionValidatorTest.php, line 88
Class
- PluginDefinitionValidatorTest
- @coversDefaultClass \Drupal\plugin\PluginDefinition\PluginDefinitionValidator
Namespace
Drupal\Tests\plugin\Unit\PluginDefinitionCode
public function testValidateContextDefinitions($valid, array $definitions) {
if (!$valid) {
$this
->expectException('\\InvalidArgumentException');
}
$this
->assertNull(PluginDefinitionValidator::validateContextDefinitions($definitions));
}