Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Upgrade utility class  tests.

Copyright: 2016 Cameron Ball <cameron@cameron1729.xyz>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 167 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

upgrade_util_testcase:: (4 methods):
  test_validate_php_curl_tls()
  validate_php_curl_tls_testcases()
  test_can_use_tls12()
  can_use_tls12_testcases()


Class: upgrade_util_testcase  - X-Ref

Upgrade utility class tests.

test_validate_php_curl_tls($curlinfo, $zts, $expected)   X-Ref
Test PHP/cURL validation.

param: array $curlinfo server curl_version array
param: int   $zts      0 or 1 as defined by PHP_ZTS
param: bool  $expected expected result

validate_php_curl_tls_testcases()   X-Ref
Test cases for validate_php_curl_tls test.


test_can_use_tls12($sslversion, $uname, $expected)   X-Ref
Test various combinations of SSL/TLS libraries.

param: string $sslversion the ssl_version string.
param: string|null $uname uname string (or null if not relevant)
param: bool $expected expected result

can_use_tls12_testcases()   X-Ref
Test cases for the can_use_tls12 test.
The returned data format is:
[(string) ssl_version, (string|null) uname (null if not relevant), (bool) expectation ]

return: array of testcases