Improve remote_test::test_notExistingCall()
commit6d3d9dba292cf0b589c8531d5b2bb21fb81cbce5
authorDamien Regad <dregad@mantisbt.org>
Sat, 6 Feb 2021 00:35:34 +0000 (6 01:35 +0100)
committerDamien Regad <dregad@mantisbt.org>
Sat, 6 Feb 2021 00:35:34 +0000 (6 01:35 +0100)
treecd14b2aaaadd5c94ef1b72304614e6af970207d1
parent868550d4c005bea07bf4ea4e8aa65b15599201f1
Improve remote_test::test_notExistingCall()

There are actually 2 distinct test cases of invalid methods:

1. Not following the definition in Api class's PHPDoc block
   - core methods begin by a 'dokuwiki' or 'wiki' followed by a . and
     the method name itself.
   - plugin methods are formed like 'plugin.<plugin name>.<method name>'
2. Method "type" does not begin with 'dokuwiki', 'wiki' or 'plugin'

A new check was added so both are now covered.

Test was modified to make use of PHPUnit expectException() method,
instead of relying on a try/catch block.
_test/tests/inc/remote.test.php