[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/_test/tests/test/ -> plugins.test.php (source)

   1  <?php
   2  
   3  /**
   4   * @group integration
   5   */
   6  class 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  }