diff options
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'); + } } |