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]

Logger tests (all).

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: 422 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 classes

logger_test:: (6 methods):
  test_base_logger()
  test_error_log_logger()
  test_output_text_logger()
  test_output_indented_logger()
  test_database_logger()
  test_file_logger()

mock_base_logger1:: (2 methods):
  action()
  get_levelstr()

mock_base_logger2:: (1 method):
  action()

mock_base_logger3:: (1 method):
  action()

mock_database_logger:: (1 method):
  insert_log_record()

mock_file_logger:: (1 method):
  get_fhandle()


Class: logger_test  - X-Ref

Logger tests (all).

test_base_logger()   X-Ref
test base_logger class


test_error_log_logger()   X-Ref
test error_log_logger class


test_output_text_logger()   X-Ref
test output_text_logger class


test_output_indented_logger()   X-Ref
test output_indented_logger class


test_database_logger()   X-Ref
test database_logger class


test_file_logger()   X-Ref
test file_logger class


Class: mock_base_logger1  - X-Ref

helper extended base_logger class that implements some methods for testing
Simply return the product of message and level

action($message, $level, $options = null)   X-Ref
No description

get_levelstr($level)   X-Ref
No description

Class: mock_base_logger2  - X-Ref

helper extended base_logger class that implements some methods for testing
Simply return the sum of message and level

action($message, $level, $options = null)   X-Ref
No description

Class: mock_base_logger3  - X-Ref

helper extended base_logger class that implements some methods for testing
Simply return 8

action($message, $level, $options = null)   X-Ref
No description

Class: mock_database_logger  - X-Ref

helper extended database_logger class that implements some methods for testing
Returns the complete info that normally will be used by insert record calls

insert_log_record($table, $columns)   X-Ref
No description

Class: mock_file_logger  - X-Ref

helper extended file_logger class that implements some methods for testing
Returns the, usually protected, handle

get_fhandle()   X-Ref
No description