public function PluginDefinitionValidatorTest::testValidateClass in Plugin 8.2
@covers ::validateClass
@dataProvider providerValidateClass
Parameters
bool $valid: Whether or not the class is valid.
string $class: The class to validate.
File
- tests/
src/ Unit/ PluginDefinition/ PluginDefinitionValidatorTest.php, line 27
Class
- PluginDefinitionValidatorTest
- @coversDefaultClass \Drupal\plugin\PluginDefinition\PluginDefinitionValidator
Namespace
Drupal\Tests\plugin\Unit\PluginDefinitionCode
public function testValidateClass($valid, $class) {
if (!$valid) {
$this
->expectException('\\InvalidArgumentException');
}
$this
->assertNull(PluginDefinitionValidator::validateClass($class));
}