xref: /dokuwiki/_test/tests/test/plugins.test.php (revision f6af1fe63a13b2734d1b69817ec800c51e6def9c)
1<?php
2
3/**
4 * @group integration
5 */
6class InttestsPluginsTest extends DokuWikiTest {
7
8    function setUp() {
9        $this->pluginsEnabled = array(
10            'testing'
11        );
12
13        parent::setUp();
14    }
15
16    function testTestingPluginEnabled() {
17        global $EVENT_HANDLER;
18
19        $request = new TestRequest();
20        $hookTriggered = false;
21
22        $EVENT_HANDLER->register_hook('TESTING_PLUGIN_INSTALLED', 'AFTER', null,
23            function() use (&$hookTriggered) {
24                $hookTriggered = true;
25            }
26        );
27
28        $request->execute();
29
30        $this->assertTrue($hookTriggered, 'Testing plugin did not trigger!');
31    }
32}
33