Create a courses.
Create a forum in this course.
Add a discussion with a few replies.
Add another forum that is hidden with an impossible conditional field (eg. firstname is empty).
Enrol a user into the course.
Create a web service token for the enrolled student to use for the following steps when making calls with the web service.
Create a web service client (similar to the one attached) that includes the first forum id in the params.
Execute the client and ensure the discussions for that forum are returned.
Change the params to include the id of the hidden forum and ensure exception thrown.
Run the PHP Unit test phpunit mod/forum/tests/externallib_test.php.
Run the PHP Unit test phpunit lib/testing/tests/generator_test.php.