protected function AnalyzerTestBase::getPlugin in Drupal 7 to 8/9 Module Upgrader 8
Instantiates the plugin class covered by this test (as indicated by the @covers annotation). The plugin instance is given a randomly generated ID and description. Dependencies will be pulled from $this->container, so this should only be called once the mock container is ready.
Parameters
array $configuration: Additional configuration to pass to the instance.
array $plugin_definition: Additional definition info to pass to the instance.
Return value
object A plugin instance.
Overrides TestBase::getPlugin
9 calls to AnalyzerTestBase::getPlugin()
- DBTest::setUp in tests/
src/ Unit/ Plugin/ DMU/ Analyzer/ DBTest.php - Mocks an entire module, called foo, in a virtual file system.
- FlagHookTest::setUp in tests/
src/ Unit/ Plugin/ DMU/ Analyzer/ FlagHookTest.php - Mocks an entire module, called foo, in a virtual file system.
- FunctionCallTest::setUp in tests/
src/ Unit/ Plugin/ DMU/ Analyzer/ FunctionCallTest.php - Mocks an entire module, called foo, in a virtual file system.
- HookFormAlterTest::setUp in tests/
src/ Unit/ Plugin/ DMU/ Analyzer/ HookFormAlterTest.php - Mocks an entire module, called foo, in a virtual file system.
- HookPermissionTest::setUp in tests/
src/ Unit/ Plugin/ DMU/ Analyzer/ HookPermissionTest.php - Mocks an entire module, called foo, in a virtual file system.
File
- tests/
src/ Unit/ Plugin/ DMU/ Analyzer/ AnalyzerTestBase.php, line 17
Class
Namespace
Drupal\Tests\drupalmoduleupgrader\Unit\Plugin\DMU\AnalyzerCode
protected function getPlugin(array $configuration = [], $plugin_definition = []) {
$plugin_definition += [
'message' => $this
->getRandomGenerator()
->sentences(4),
'summary' => NULL,
'documentation' => [],
'tags' => [],
];
return parent::getPlugin($configuration, $plugin_definition);
}