protected function ConvertBooleanTest::instantiatePlugin in Tamper 8
Instantiates a plugin.
Return value
\Drupal\tamper\TamperInterface A tamper plugin.
Overrides TamperPluginTestBase::instantiatePlugin
File
- tests/
src/ Unit/ Plugin/ Tamper/ ConvertBooleanTest.php, line 18
Class
- ConvertBooleanTest
- Tests the convert boolean plugin.
Namespace
Drupal\Tests\tamper\Unit\Plugin\TamperCode
protected function instantiatePlugin() {
$config = [
ConvertBoolean::SETTING_TRUTH_VALUE => 'A',
ConvertBoolean::SETTING_FALSE_VALUE => 'B',
ConvertBoolean::SETTING_MATCH_CASE => FALSE,
ConvertBoolean::SETTING_NO_MATCH => 'No match',
ConvertBoolean::SETTING_OTHER_TEXT => '',
];
return new ConvertBoolean($config, 'convert_boolean', [], $this
->getMockSourceDefinition());
}