Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added missing testing plugin with tests to test tests
- Loading branch information
Tobias Sarnowski
committed
Apr 18, 2012
1 parent
bc82a8a
commit f693efb
Showing
4 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
lib/plugins/testing/_testing/dummy_plugin_integration_test.test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?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!'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
class TestingDummyPluginTest extends DokuWikiTest { | ||
|
||
function testNothing() { | ||
$this->assertTrue(true, 'wow, you really fucked up'); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
author Tobias Sarnowski | ||
email tobias@trustedco.de | ||
date 2012-04-17 | ||
name Testing Plugin | ||
desc Used to test the test framework. |