[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/tests/fixtures/ -> testable_update_api.php (summary)

Provides \core\update\testable_api class.

Copyright: 2015 David Mudrak <david@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 210 lines (7 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

testable_api:: (3 methods):
  convert_branch_numbering_format()
  get_serviceurl_pluginfo()
  call_service()


Class: testable_api  - X-Ref

Testable variant of \core\update\api class.

Provides access to some protected methods we want to explicitly test and
bypass the actual cURL calls by providing fake responses.

convert_branch_numbering_format($branch)   X-Ref
Provides access to the parent protected method.

param: int $branch
return: string

get_serviceurl_pluginfo()   X-Ref
Returns fake URL of the pluginfo.php API end-point.

return: string

call_service($serviceurl, array $params=array()   X-Ref
Mimics the call to the given end-point service with the given parameters.

This simulates a hypothetical plugins directory with a single plugin
'foo_bar' available (with a single release).

param: string $serviceurl
param: array $params
return: stdClass|bool



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