xref: /dokuwiki/lib/plugins/testing/action.php (revision 8c7c53b0321a3cd3116b8d3b2ad27863a38dece7)
1<?php
2
3use dokuwiki\Extension\ActionPlugin;
4use dokuwiki\Extension\EventHandler;
5use dokuwiki\Extension\Event;
6
7/**
8 * Plugin for testing the test system
9 *
10 * This plugin doesn't really do anything and should always be disabled
11 *
12 * @author Tobias Sarnowski <tobias@trustedco.de>
13 */
14class action_plugin_testing extends ActionPlugin
15{
16
17    /** @inheritdoc */
18    public function register(EventHandler $controller) {
19        $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted');
20    }
21
22    public function dokuwikiStarted() {
23        $param = [];
24        Event::createAndTrigger('TESTING_PLUGIN_INSTALLED', $param);
25        msg('The testing plugin is enabled and should be disabled.', -1);
26    }
27}
28