diff options
author | Dominik Eckelmann <deckelmann@gmail.com> | 2012-03-21 13:15:18 +0100 |
---|---|---|
committer | Dominik Eckelmann <deckelmann@gmail.com> | 2012-03-21 13:15:18 +0100 |
commit | 7c35ac36c1dea2d6f26d8184dcbf1fe5afae59ac (patch) | |
tree | 98c845dc14d62ae86df9af3c8c657703f1c9deef /_test | |
parent | 96946cc94d3ecb3832e2a1ce35c49743e25329e1 (diff) | |
download | rpg-7c35ac36c1dea2d6f26d8184dcbf1fe5afae59ac.tar.gz rpg-7c35ac36c1dea2d6f26d8184dcbf1fe5afae59ac.tar.bz2 |
added RPC_CALL_ADD event.
This event enables plugins to register custom method names.
Diffstat (limited to '_test')
-rw-r--r-- | _test/cases/inc/remote.test.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/_test/cases/inc/remote.test.php b/_test/cases/inc/remote.test.php index 186f8e65a..f03d13ce1 100644 --- a/_test/cases/inc/remote.test.php +++ b/_test/cases/inc/remote.test.php @@ -309,4 +309,16 @@ class remote_test extends UnitTestCase { $remoteApi->call('plugin.testplugin.methodString'); } + function test_pluginCallCustomPath() { + global $EVENT_HANDLER; + $EVENT_HANDLER->register_hook('RPC_CALL_ADD', 'BEFORE', &$this, 'pluginCallCustomPathRegister'); + + $remoteApi = new RemoteAPI(); + $result = $remoteApi->call('custom.path'); + $this->assertEqual($result, 'success'); + } + + function pluginCallCustomPathRegister(&$event, $param) { + $event->data['custom.path'] = array('testplugin', 'methodString'); + } } |