You are here

protected function DefaultValueTest::instantiatePlugin in Tamper 8

Instantiates a plugin.

Return value

\Drupal\tamper\TamperInterface A tamper plugin.

Overrides TamperPluginTestBase::instantiatePlugin

File

tests/src/Unit/Plugin/Tamper/DefaultValueTest.php, line 18

Class

DefaultValueTest
Tests the default value plugin.

Namespace

Drupal\Tests\tamper\Unit\Plugin\Tamper

Code

protected function instantiatePlugin() {
  $config = [
    DefaultValue::SETTING_DEFAULT_VALUE => 'HEYO!',
    DefaultValue::SETTING_ONLY_IF_EMPTY => FALSE,
  ];
  return new DefaultValue($config, 'default_value', [], $this
    ->getMockSourceDefinition());
}