[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/webservice/xmlrpc/tests/ -> lib_test.php (summary)

Unit tests for the XML-RPC web service.

Copyright: 2015 Jun Pataleta <jun@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 140 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

webservice_xmlrpc_test:: (4 methods):
  setUp()
  test_client_with_array_response()
  test_client_with_value_response()
  test_client_with_fault_response()

webservice_xmlrpc_client_mock:: (2 methods):
  set_mock_response()
  call()


Class: webservice_xmlrpc_test  - X-Ref

Unit tests for the XML-RPC web service.

setUp()   X-Ref
Setup.


test_client_with_array_response()   X-Ref
Test for array response.


test_client_with_value_response()   X-Ref
Test for value response.


test_client_with_fault_response()   X-Ref
Test for fault response.


Class: webservice_xmlrpc_client_mock  - X-Ref

Class webservice_xmlrpc_client_mock.

Mock class that returns the processed XML-RPC response.

set_mock_response($mockresponse)   X-Ref
XML-RPC mock response setter.

param: string $mockresponse

call($functionname, $params = array()   X-Ref
Since the call method uses download_file_content and it is hard to make an actual call to a web service,
we'll just have to simulate the receipt of the response from the server using the mock response so we
can test the processing result of this method.

param: string $functionname the function name
param: array $params the parameters of the function
return: mixed The decoded XML RPC response.



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1