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.

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

Test progressive_parser and progressive_parser_processor tests.

Copyright: 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 940 lines (43 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 5 classes

parser_test:: (8 methods):
  test_parser_public_api()
  test_parser_results()
  test_simplified_parser_results()
  test_simplified_david_backup19_file_fragment()
  test_grouped_parser_results()
  test_grouped_david_backup19_file_fragment()
  test_grouped_at_empty_node()
  helper_check_notifications_order_integrity()

mock_auto_parser_processor:: (2 methods):
  __construct()
  process_chunk()

mock_parser_processor:: (2 methods):
  process_chunk()
  get_chunks()

mock_simplified_parser_processor:: (7 methods):
  dispatch_chunk()
  notify_path_start()
  notify_path_end()
  get_chunks()
  get_start_notifications()
  get_end_notifications()
  get_all_notifications()

mock_grouped_parser_processor:: (7 methods):
  dispatch_chunk()
  notify_path_start()
  notify_path_end()
  get_chunks()
  get_start_notifications()
  get_end_notifications()
  get_all_notifications()


Class: parser_test  - X-Ref

Test progressive_parser and progressive_parser_processor tests.

test_parser_public_api()   X-Ref
No description

test_parser_results()   X-Ref
No description

test_simplified_parser_results()   X-Ref
No description

test_simplified_david_backup19_file_fragment()   X-Ref
test how the simplified processor and the order of start/process/end events happens
with one real fragment of one backup 1.9 file, where some problems
were found by David, hence we honor him in the name of the test ;-)


test_grouped_parser_results()   X-Ref
No description

test_grouped_david_backup19_file_fragment()   X-Ref
test how the grouped processor and the order of start/process/end events happens
with one real fragment of one backup 1.9 file, where some problems
were found by David, hence we honor him in the name of the test ;-)


test_grouped_at_empty_node()   X-Ref
No description

helper_check_notifications_order_integrity($notifications)   X-Ref
Helper function that given one array of ordered start/process/end notifications will
check it of integrity like:
- process only happens if start is the previous notification
- end only happens if dispatch is the previous notification
- start only happen with level > than last one and if there is no already started like that

param: array $notifications ordered array of notifications with format [start|process|end]:path
return: int number of integrity problems found (errors)

Class: mock_auto_parser_processor  - X-Ref

__construct($unit_test_case)   X-Ref
No description

process_chunk($data)   X-Ref
No description

Class: mock_parser_processor  - X-Ref

process_chunk($data)   X-Ref
No description

get_chunks()   X-Ref
No description

Class: mock_simplified_parser_processor  - X-Ref

dispatch_chunk($data)   X-Ref
No description

notify_path_start($path)   X-Ref
No description

notify_path_end($path)   X-Ref
No description

get_chunks()   X-Ref
No description

get_start_notifications()   X-Ref
No description

get_end_notifications()   X-Ref
No description

get_all_notifications()   X-Ref
No description

Class: mock_grouped_parser_processor  - X-Ref

dispatch_chunk($data)   X-Ref
No description

notify_path_start($path)   X-Ref
No description

notify_path_end($path)   X-Ref
No description

get_chunks()   X-Ref
No description

get_start_notifications()   X-Ref
No description

get_end_notifications()   X-Ref
No description

get_all_notifications()   X-Ref
No description