CodeExplorer RulePlugin example
} public static function dataProviderForTestPostEventNullsPayload(): array
{ $plugin =
new PluginEntity();
$plugin->
setName('TestPlugin'
);
$plugin->
setBaseClass(RulePlugin::
class);
$plugin->
setPath(''
);
$context = Context::
createDefaultContext();
$rulePlugin =
new RulePlugin(false, ''
);
$collection =
new MigrationCollection( new MigrationSource('asd',
[]),
new MigrationRuntime(new NullConnection(),
new NullLogger()),
new NullConnection() );
return [ [new PluginPostInstallEvent($plugin,
new InstallContext($rulePlugin,
$context, '', '',
$collection))],
[new PluginPostActivateEvent($plugin,
new ActivateContext($rulePlugin,
$context, '', '',
$collection))],
[new PluginPostUpdateEvent($plugin,
new UpdateContext($rulePlugin,
$context, '', '',
$collection, ''
))],
[