Skip to content
Snippets Groups Projects
Commit f693efbc authored by Tobias Sarnowski's avatar Tobias Sarnowski
Browse files

added missing testing plugin with tests to test tests

parent bc82a8a1
No related branches found
No related tags found
No related merge requests found
<?php
/**
* @group integration
*/
class TestingDummyPluginIntegrationTest extends DokuWikiTest {
function setUp() {
$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!');
}
}
<?php
class TestingDummyPluginTest extends DokuWikiTest {
function testNothing() {
$this->assertTrue(true, 'wow, you really fucked up');
}
}
<?php
class action_plugin_testing extends DokuWiki_Action_Plugin {
function register(&$controller) {
$controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'dokuwikiStarted');
}
function dokuwikiStarted() {
$param = array();
trigger_event('TESTING_PLUGIN_INSTALLED', $param);
msg('hohoho');
}
}
author Tobias Sarnowski
email tobias@trustedco.de
date 2012-04-17
name Testing Plugin
desc Used to test the test framework.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment