summaryrefslogtreecommitdiff
path: root/_testing/integrationtests/basic/hooks.test.php
diff options
context:
space:
mode:
authorTobias Sarnowski <tobias@trustedco.de>2012-04-15 15:07:26 +0000
committerTobias Sarnowski <tobias@trustedco.de>2012-04-15 15:07:26 +0000
commit561684d896adf0e59938acc1a03903059c2d63a0 (patch)
tree291486ef6f4f1bda77295ad34093b48cc5eb60ad /_testing/integrationtests/basic/hooks.test.php
parentf1e1cee8a7363fb13b1ce96a898b038c61c60c5a (diff)
downloadrpg-561684d896adf0e59938acc1a03903059c2d63a0.tar.gz
rpg-561684d896adf0e59938acc1a03903059c2d63a0.tar.bz2
initial commit for integration test framework
Diffstat (limited to '_testing/integrationtests/basic/hooks.test.php')
-rw-r--r--_testing/integrationtests/basic/hooks.test.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/_testing/integrationtests/basic/hooks.test.php b/_testing/integrationtests/basic/hooks.test.php
new file mode 100644
index 000000000..0ba389659
--- /dev/null
+++ b/_testing/integrationtests/basic/hooks.test.php
@@ -0,0 +1,20 @@
+<?php
+
+class HooksTest extends PHPUnit_Framework_TestCase {
+
+ var $hookTriggered = false;
+
+ function hookTriggered() {
+ $this->hookTriggered = true;
+ }
+
+ function testHookTriggering() {
+ global $EVENT_HANDLER;
+ $EVENT_HANDLER->register_hook('TPL_CONTENT_DISPLAY', 'AFTER', $this, 'hookTriggered');
+
+ $request = new TestRequest();
+ $request->execute();
+
+ $this->assertTrue($this->hookTriggered, 'Hook was not triggered as expected!');
+ }
+}