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