Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 39 and 401]

Testing the H5peditorStorage interface implementation.

Copyright: 2020 Victor Deniz <victor@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 399 lines (15 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: editor_framework_test  - X-Ref

Test class covering the H5peditorStorage interface implementation.

setupBeforeClass()   X-Ref
Setup to ensure that fixtures are loaded.


setUp()   X-Ref
Set up function for tests.


test_get_language(array $datalib, string $lang, ?bool $emptyexpected = false, ?string $machinename = '',?int $majorversion = 1, ?int $minorversion = 0)   X-Ref
Test that the method getLanguage retrieves the translation of a library in the requested language.

param: array  $datalib        Library data to create
param: string $lang           Language to retrieve the translation
param: bool   $emptyexpected  True when false value is expected; false, otherwise
param: string $machinename    The machine readable name of the library(content type)
param: int    $majorversion   Major part of version number
param: int    $minorversion   Minor part of version number

get_language_provider()   X-Ref
Data provider for test_get_language().

return: array

test_get_available_languages(array $datalib, ?array $expectedlangs = null, ?string $machinename = '',?int $majorversion = 1, ?int $minorversion = 0)   X-Ref
Test that the method getAvailableLanguages retrieves all the language available of a library.

param: array  $datalib        Library data to create
param: array  $expectedlangs  Available languages expected.
param: string $machinename    The machine readable name of the library(content type)
param: int    $majorversion   Major part of version number
param: int    $minorversion   Minor part of version number

get_available_languages_provider()   X-Ref
Data provider for test_get_available_languages().

return: array

test_getLibraries()   X-Ref
Test that the method getLibraries get the specified libraries or all the content types (runnable = 1).