Completed
Push — adminicons ( 220b8a...d1a314 )
by Andreas
03:46
created

TestingDummyPluginIntegrationTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
1
<?php
2
3
/**
4
 * @group integration
5
 */
6
class TestingDummyPluginIntegrationTest 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