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 310] [Versions 39 and 311] [Versions 39 and 400] [Versions 39 and 401] [Versions 39 and 402] [Versions 39 and 403]

Test tablelib.

Copyright: 2013 Damyon Wiese <damyon@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 791 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: core_tablelib_testcase  - 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