Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Class: tablelib_test  - X-Ref

Test some of tablelib.

generate_columns($cols)   X-Ref
No description

generate_headers($cols)   X-Ref
No description

generate_data($rows, $cols)   X-Ref
No description

run_table_test($columns, $headers, $sortable, $collapsible, $suppress, $nosorting, $data, $pagesize)   X-Ref
Create a table with properties as passed in params, add data and output html.

param: string[] $columns
param: string[] $headers
param: bool     $sortable
param: bool     $collapsible
param: string[] $suppress
param: string[] $nosorting
param: (array|object)[] $data
param: int      $pagesize

create_and_setup_table($columns, $headers, $sortable, $collapsible, $suppress, $nosorting)   X-Ref
Create a table with properties as passed in params.

param: string[] $columns
param: string[] $headers
param: bool $sortable
param: bool $collapsible
param: string[] $suppress
param: string[] $nosorting
return: flexible_table

test_empty_table()   X-Ref
No description

test_has_next_pagination()   X-Ref
No description

test_has_hide()   X-Ref
No description

test_has_not_hide()   X-Ref
No description

test_has_sort()   X-Ref
No description

test_has_not_sort()   X-Ref
No description

test_has_not_next_pagination()   X-Ref
No description

test_1_col()   X-Ref
No description

test_empty_rows()   X-Ref
No description

test_5_cols()   X-Ref
No description

test_50_cols()   X-Ref
No description

fullname_column_provider()   X-Ref
Data provider for test_fullname_column

return: array

test_fullname_column(string $format)   X-Ref
Test fullname column observes configured alternate fullname format configuration

param: string $format
return: void

test_fullname_column_prohibit_viewfullnames(string $format)   X-Ref
Test fullname column ignores fullname format configuration for a user with viewfullnames capability prohibited

param: string $format
return: void

test_get_row_html()   X-Ref
No description

test_persistent_table()   X-Ref
No description

prepare_table_for_reset_test($tableid)   X-Ref
Helper method for preparing tables instances in {@link self::test_can_be_reset()}.

param: string $tableid
return: testable_flexible_table

test_can_be_reset()   X-Ref
No description

test_table_export()   X-Ref
Test export in CSV format


test_initials_first_set(?string $getvalue, ?string $setvalue, ?string $finalvalue)   X-Ref
Test the initials functionality.

param: string|null $getvalue
param: string|null $setvalue
param: string|null $finalvalue

test_initials_last_set(?string $getvalue, ?string $setvalue, ?string $finalvalue)   X-Ref
Test the initials functionality.

param: string|null $getvalue
param: string|null $setvalue
param: string|null $finalvalue

initials_provider()   X-Ref
Data for testing initials providers.

return: array