aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/plugins/testing/_test/dummy_plugin_integration_test.test.php
blob: f8054755c0884fb24979d1ec061649413cdf2069 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

/**
 * @group integration
 */
class TestingDummyPluginIntegrationTest extends DokuWikiTest {

    function setUp() : void {
        $this->pluginsEnabled = array(
            'testing'
        );

        parent::setUp();
    }

    function testTestingPluginEnabled() {
        global $EVENT_HANDLER;

        $request = new TestRequest();
        $hookTriggered = false;

        $EVENT_HANDLER->register_hook('TESTING_PLUGIN_INSTALLED', 'AFTER', null,
            function() use (&$hookTriggered) {
                $hookTriggered = true;
            }
        );

        $request->execute();

        $this->assertTrue($hookTriggered, 'Testing plugin did not trigger!');
    }
}